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'
        }
    }
}
相关推荐
maply11 小时前
VSCode 中的 Git Graph扩展使用详解
ide·git·vscode·编辑器·扩展
花花鱼11 小时前
vscode script 中间的function import等关键字 先高亮,然后又灰了,并且按ctrl+/ 注释以html的形式,导致报错处理
ide·vscode·编辑器
恋猫de小郭12 小时前
Android Studio 正式版 10 周年回顾,承载 Androider 的峥嵘十年
android·ide·android studio
aaaweiaaaaaa15 小时前
php的使用及 phpstorm环境部署
android·web安全·网络安全·php·storm
工程师老罗17 小时前
Android记事本App设计开发项目实战教程2025最新版Android Studio
android
pengyu21 小时前
系统化掌握 Dart 编程之异常处理(二):从防御到艺术的进阶之路
android·flutter·dart
消失的旧时光-194321 小时前
android Camera 的进化
android
基哥的奋斗历程1 天前
Openfga 授权模型搭建
android·adb
老大白菜1 天前
Windsurf cursor vscode+cline 与Python快速开发指南
ide·vscode·python
XYu123011 天前
Spring Boot 热部署实现指南
java·ide·spring boot·intellij-idea