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'
        }
    }
}
相关推荐
雨白31 分钟前
Android 两种拖拽 API 详解:ViewDragHelper 和 OnDragListener 的原理与区别
android
元亓亓亓35 分钟前
JavaWeb--day3--Ajax&Element&路由&打包部署
android·ajax·okhttp
return(b,a%b);38 分钟前
VSCode 远程开发连接(glibc<2.28)
ide·vscode·编辑器
speop38 分钟前
vscode使用tmux技巧
ide·vscode·编辑器
居然是阿宋41 分钟前
Android XML属性与Jetpack Compose的对应关系(控件基础属性篇)
android
GoatJun1 小时前
Android ScrollView嵌套RecyclerView 导致RecyclerView数据展示不全问题
android
潜龙95271 小时前
第6.2节 Android Agent开发<二>
android·python·覆盖率数据
网安Ruler3 小时前
代码审计-PHP专题&原生开发&SQL注入&1day分析构造&正则搜索&语句执行监控&功能定位
android
理想国的女研究僧3 小时前
Jupyter Notebook操作指南(1)
ide·python·学习·jupyter
paid槮4 小时前
MySql基础:数据类型
android·mysql·adb