简体   繁体   English

Google App Engine Gradle依赖冲突

[英]Google App Engine Gradle Dependency Conflict

I'm facing a problem with my dependencies in my app that will not let me add my endpoints-backend module as a dependency to my app module like so: 我在我的应用程序中遇到依赖项问题,这使我无法将endpoints-backend模块作为依赖项添加到我的app模块中,如下所示:

依赖

When I compile, it gives me this error: 当我编译时,它给了我这个错误:

Error:Execution failed for task ':app:preDexDebug'. 错误:任务':app:preDexDebug'的执行失败。 >com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 3 > com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:处理'command'/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java''用非零退出值3结束

When I remove the endpoints-backend dependency, the program runs, but I need it as a dependency so I can access the endpoints code inside my MainActivity. 当我删除endpoints-backend依赖项时,程序将运行,但是我需要将其作为依赖项,以便可以访问MainActivity中的端点代码。

Here's my 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')
}

All Help is appreciated! 感谢所有帮助!

You should remove this line: 您应该删除以下行:

compile project(':endpoints-backend')

You have it included here: 您将其包含在此处:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM