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'
        }
    }
}
相关推荐
韩初心21 分钟前
使用 visual studio 2022 编译 Lua5.4.8
ide·visual studio·lua5.4
移动开发者1号1 小时前
ReLinker优化So库加载指南
android·kotlin
山野万里__1 小时前
C++与Java内存共享技术:跨平台与跨语言实现指南
android·java·c++·笔记
Huckings1 小时前
Android 性能问题
android
移动开发者1号2 小时前
剖析 Systrace:定位 UI 线程阻塞的终极指南
android·kotlin
移动开发者1号2 小时前
深入解析内存抖动:定位与修复实战(Kotlin版)
android·kotlin
whysqwhw2 小时前
OkHttp深度架构缺陷分析与革命性演进方案
android
comeilmforever2 小时前
IDEA2025 Version Control 窗口 local changes显示
java·ide·intellij-idea
Digitally4 小时前
如何将文件从 iPhone 传输到 Android(新指南)
android·ios·iphone
whysqwhw5 小时前
OkHttp深度架构缺陷分析与演进规划
android