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'
        }
    }
}
相关推荐
Estar.Lee5 小时前
如何使用PHP创建一个安全的用户注册表单,包含输入验证、数据过滤和结果反馈教程。
android·安全·php
on the way 1235 小时前
创建型模式之Factory Method(工厂方法)
android·java·工厂方法模式
泽韦德5 小时前
【MySQL】第11节|MySQL 8.0 主从复制原理分析与实战(一)
android·数据库·mysql
我命由我123456 小时前
Android 开发问题:Plugin [id: ‘org.jetbrains.kotlin.android‘] was not found
android·java·开发语言·java-ee·kotlin·安卓·android-studio
androidwork6 小时前
使用 Kotlin 实现 Android 自定义 Lint 检查规则的步骤指南
android·java·kotlin
大熊的瓜地8 小时前
android 输入系统
android
俊杰_8 小时前
安卓11 不带谷歌包默认桌面布局
android
寒山李白8 小时前
JavaSE核心知识点04工具04-02(IDEA)
java·开发语言·ide·intellij-idea
好奇的菜鸟9 小时前
如何使用 WebStorm 编写第一个 Node.js 项目
ide·node.js·webstorm
shmily麻瓜小菜鸡9 小时前
用nz-tabel写一个合并表格
android·java·开发语言