Android项目依赖性需要不同版本的Android Gradle插件

Android项目依赖性需要不同版本的Android Gradle插件,第1张

概述我的Android项目的gradle构建失败,因为我的项目的依赖项需要较旧版本的androidgradle插件:Downloadhttps:/epo1.maven.org/maven2/org/springframework/android/spring-android-core/1.0.1.RELEASE/spring-android-core-1.0.1.RELEASE.jarDownloadhttps:/epo1.maven.org/m

我的Android项目的gradle构建失败,因为我的项目的依赖项需要较旧版本的androID gradle插件:

Download https://repo1.maven.org/maven2/org/springframework/androID/spring-androID-core/1.0.1.RELEASE/spring-androID-core-1.0.1.RELEASE.jarDownload https://repo1.maven.org/maven2/org/springframework/androID/spring-androID-rest-template/1.0.1.RELEASE/spring-androID-rest-template-1.0.1.RELEASE.jarDownload https://repo1.maven.org/maven2/org/springframework/spring-asm/3.0.7.RELEASE/spring-asm-3.0.7.RELEASE.jarDownload https://repo1.maven.org/maven2/org/springframework/spring-core/3.0.7.RELEASE/spring-core-3.0.7.RELEASE.jarDownload https://repo1.maven.org/maven2/org/springframework/security/spring-security-crypto/3.1.3.RELEASE/spring-security-crypto-3.1.3.RELEASE.jarDownload https://repo1.maven.org/maven2/org/springframework/social/spring-social-core/1.0.2.RELEASE/spring-social-core-1.0.2.RELEASE.jarDownload https://repo1.maven.org/maven2/org/springframework/androID/spring-androID-auth/1.0.1.RELEASE/spring-androID-auth-1.0.1.RELEASE.jarDownload https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.1.1/jackson-annotations-2.1.1.jarDownload https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.1.1/jackson-core-2.1.1.jarDownload https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.1.2/jackson-databind-2.1.2.jarFAILURE: Build Failed with an exception.* What went wrong:A problem occurred configuring project ':myapp'.> Could not resolve all dependencIEs for configuration ':myapp:classpath'.   > Could not find any version that matches com.androID.tools.build:gradle:0.7.+.     Searched in the following locations:         https://jcenter.bintray.com/com/androID/tools/build/gradle/maven-Metadata.xml         https://maven.fabric.io/public/com/androID/tools/build/gradle/maven-Metadata.xml         https://maven.fabric.io/public/com/androID/tools/build/gradle/     required by:         phase1:myapp:unspecifIEd > com.jakewharton.hugo:hugo-plugin:1.1.0* Try:Run with --stacktrace option to get the stack trace. Run with --info or --deBUG option to get more log output.BUILD FailedTotal time: 20.894 secs

我的项目使用com.androID.tools.build:gradle:1.0.0,但是依赖项com.jakewharton.hugo正在寻找gradle:0.7. .

这是我的gradle构建文件.

顶级build.gradle:

buildscript {    repositorIEs {        mavenCentral()    }    dependencIEs {        classpath 'com.androID.tools.build:gradle:1.0.0'    }}allprojects {    repositorIEs {        mavenCentral()    }}

子项目build.gradle:

buildscript {    repositorIEs {        jcenter()        maven { url 'https://maven.fabric.io/public' }    }    dependencIEs {        classpath 'io.fabric.tools:gradle:1.+'        classpath 'com.jakewharton.hugo:hugo-plugin:1.1.0'    }}apply plugin: 'com.androID.application'apply plugin: 'io.fabric'apply plugin: 'hugo'androID {    compileSdkVersion 20    buildToolsversion '21.1.2'    defaultConfig {        minSdkVersion 13        targetSdkVersion 20        versionCode 1        versionname "1.0"    }    buildTypes {        release {            MinifyEnabled false            proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.txt'        }    }    productFlavors {    }}......

在Github上查找Hugo,我确认1.1.0版确实要求版本0.7. ,但最新代码(未发布)使用新版本(1.1.0)

有没有办法允许Hugo使用旧版本进行构建,而用新版本进行项目的其余部分构建?

要么

我将顶级Hugo source directory from Github复制到了我的项目中.我如何告诉gradle在那找到hugo插件?

解决方法:

我们遇到了同样的问题.如果将存储库从jcenter()更改为mavenCentral(),它将解决此问题.也可以同时具有两个存储库.

总结

以上是内存溢出为你收集整理的Android项目依赖性需要不同版本的Android Gradle插件全部内容,希望文章能够帮你解决Android项目依赖性需要不同版本的Android Gradle插件所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1089162.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存