Android studio之编译提示Could not find :umeng-asms-v1.2.1

1 、问题

java 复制代码
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not find :umeng-asms-v1.2.1:.
     Required by:
         project :app
   > Could not find :umeng-apm-v1.2.0:.
     Required by:
         project :app

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

只要提示这种Could not find :可能arr包没有引入正确,可能少了dirs

我的是gradle 8.0,在setting gradle文件添加代码

flatDir { dirs 'app/libs' }

java 复制代码
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()

        flatDir {
            dirs 'app/libs'
        }
    }
}
相关推荐
用户74589002079546 小时前
线程池
android
专注前端30年7 小时前
【PHP开发与安全防护实战】性能调优手册
android·安全·php
王正南8 小时前
安卓逆向之LSposed开发(一)
android·xposed·lsposed
YIN_尹9 小时前
【MySQL】数据类型(上)
android·mysql·adb
啊湘9 小时前
vscode 使用 github (适用CURSOR等使用)
ide·vscode·github·cursor·mcp
robotx10 小时前
AOSP设备节点权限添加相关
android
顾林海11 小时前
Android文件系统安全与权限控制:给应用数据上把“安全锁”
android·面试·操作系统
青莲84311 小时前
Android 动画机制完整详解
android·前端·面试
城东米粉儿11 小时前
android 离屏预渲染 笔记
android
未知名Android用户11 小时前
Android自定义 View + Canvas—声纹小球动画
android