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'
        }
    }
}
相关推荐
曹申阳33 分钟前
1. 使用VSCode开发uni-app环境搭建
ide·vscode·uni-app
大江东去浪淘尽千古风流人物2 小时前
【Wins】Visual Studio memory leak check使用教程
ide·visual studio
molong9312 小时前
Kotlin 内联函数、高阶函数、扩展函数
android·开发语言·kotlin
每天更新3 小时前
VSCODE 使用GDB
ide·vscode·编辑器
paoqi 包奇4 小时前
pycharm中使用anaconda指定虚拟环境
ide·python·pycharm
叶辞树4 小时前
Android framework调试和AMS等服务调试
android
傅科摆 _ py5 小时前
解决 Vscode 中运行键突然消失的问题
ide·vscode·编辑器
丨Sky丨夜吻5 小时前
vscode扩展
ide·vue.js·vscode
慕伏白6 小时前
【慕伏白】Android Studio 无线调试配置
android·ide·android studio
低调小一6 小时前
Kuikly 小白拆解系列 · 第1篇|两棵树直调(Kotlin 构建与原生承载)
android·开发语言·kotlin