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'
        }
    }
}
相关推荐
AFinalStone2 小时前
Android 7系统网络(四)Native层(下)—netd Controller详解
android·网络
爱笑鱼2 小时前
Handler(一):post 之后,Runnable 到底在哪个线程执行?
android
木木子223 小时前
[特殊字符] 音乐播放器——状态驱动的多媒体控制
android·开发语言·华为·php·harmonyos
雨白3 小时前
C 语言基础:结构体、联合体与枚举
android
阿巴斯甜4 小时前
Android 代码混淆
android
Luoxi_84 小时前
Anaconda超详细的安装教程+VScode的使用
ide·vscode·编辑器
球king6 小时前
CC GUI 插件:在 IDEA 中使用 CodeX
java·ide·intellij-idea
apihz6 小时前
台风实时与历史详情查询免费 API 接口完整教程
android·开发语言·tcp/ip·dubbo·台风·天气预报
浪客川7 小时前
AOSP源码隐藏状态栏
android·aosp
没有了遇见7 小时前
AI Agent 是什么?—— 一文理解 LLM、Memory、Skills、Tools、MCP、Workflow,Context
android·前端·程序员