Could not find com.meituan.android.walle:library:1.1.6

构建项目出现报错,拉不到美团的渠道库 walle

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsRelease'.
> Could not resolve all files for configuration ':app:releaseCompileClasspath'.
   > Could not find com.meituan.android.walle:library:1.1.6.
     Required by:
         project :app

* Try:
> Run with --debug option to get more log output.
> Run with --scan to get full insights.

赶紧官方 github 上瞧瞧,发现有最新的1.1.7版本,走起走起

项目的根目录 build.gradle 文件中添加Walle Gradle插件的依赖

apply from: "conf.gradle"
buildscript {
    repositories {
        google()
        mavenCentral()
        maven {url 'https://maven.aliyun.com/repository/jcenter'}//注意,这里需要加上,否则拉不到walle:plugin,官方没提示
        maven {url 'https://maven.aliyun.com/repository/google'}//注意,这里需要加上,否则拉不到walle:plugin,官方没提示
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.4.2'
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
        classpath "org.jacoco:org.jacoco.core:0.8.10"
        classpath 'com.meituan.android.walle:plugin:1.1.7'//这里需要加上拉walle:plugin
    }
}
当前app的 build.gradle 文件中apply这个插件,并更新为1.1.7版本的链接

apply plugin: 'walle'
或
plugins {
    ...
    id 'walle'
}

dependencies {
    implementation 'com.meituan.android.walle:library:1.1.7'
}

立即 sync 后编译走一波,结果walle:plugin下载成功了,但是walle:library:1.1.7还是拉不成功,最后发现新版本的 gradle 还需再 settings.gradle里面加上下载地址才行,如下:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        jcenter() // Warning: this repository is going to shut down soon
        maven {url 'https://maven.aliyun.com/repository/jcenter'}//注意,这里需要加上,否则拉不到walle:library,官方没提示
        maven {url 'https://maven.aliyun.com/repository/google'}//注意,这里需要加上,否则拉不到walle:library,官方没提示
    }
}

Game Over

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容