2
回答
dagger2编译失败
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

正在学习dagger2  ,但是写好一个例子,运行时 失败   请问是什么原因???

报异常

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 3

build.gradle的配置如下 :

apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt'  android {
    compileSdkVersion 23  buildToolsVersion "23.0.3"   defaultConfig { applicationId "com.example.app.simpledagger"  minSdkVersion 15  targetSdkVersion 23  versionCode 1  versionName "1.0"  multiDexEnabled true  }
    buildTypes {
        release { minifyEnabled false  proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'  }
    }
}
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'  }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12' //    compile 'com.android.support:appcompat-v7:23.4.0' 
 compile 'com.google.dagger:dagger:2.5'  
compile 'com.google.dagger:dagger-compiler:2.5' 
 provided 'org.glassfish:javax.annotation:10.0-b28' 
}
举报
zhx2012
发帖于1年前 2回/357阅
顶部