【问题标题】:Google App Engine Gradle Dependency ConflictGoogle App Engine Gradle 依赖冲突
【发布时间】:2015-04-21 19:57:05
【问题描述】:

我的应用程序中的依赖项存在问题,我无法将 endpoints-backend 模块作为依赖项添加到 app 模块中,如下所示:

当我编译时,它给了我这个错误:

错误:任务 ':app:preDexDebug' 执行失败。 >com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java''以非零退出值 3 结束

当我删除 endpoints-backend 依赖项时,程序会运行,但我需要它作为依赖项,以便可以访问 MainActivity 中的端点代码。

这是我的 Gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.blume.android"
    minSdkVersion 14
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile project(path: ':endpoints-backend', configuration: 'android-endpoints')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
compile project(path: ':cloud-backend', configuration: 'android-endpoints')
compile 'javax.persistence:persistence-api:1.0'
compile project(':endpoints-backend')
}

感谢所有帮助!

【问题讨论】:

    标签: android google-app-engine android-gradle-plugin google-cloud-endpoints


    【解决方案1】:

    你应该删除这一行:

    compile project(':endpoints-backend')
    

    您已将其包含在此处:

    compile project(path: ':endpoints-backend', configuration: 'android-endpoints')
    

    【讨论】:

    • 唯一的问题是当我这样做时,我无法再访问 MainActivity 中的端点模块。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多