我有一個Android項目,可以與預gradle:2.1.0-alpha3版本完美配合。現在,它拋出此類錯誤,沒有線索如何解決這些問題:升級到gradle後無法編譯項目:2.1.0-alpha5
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.NoSuchMethodError: com.google.common.collect.FluentIterable.append(Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable;
這是相當奇怪的,有一個特殊分支,在過去的四五天也用完就扔在APK重複的對象,details here
我的應用程序的模塊的build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0-alpha5'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
allprojects {
repositories {
jcenter()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
和我模塊的build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "..."
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dataBinding {
enabled = true
}
lintOptions {
disable 'InvalidPackage'
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
//PixlUI
repositories {
maven {
url "https://jitpack.io"
}
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// Dagger 2
apt 'com.google.dagger:dagger-compiler:2.0.2'
provided 'org.glassfish:javax.annotation:10.0-b28'
//Autodagger
apt 'com.github.lukaspili.autodagger2:autodagger2-compiler:1.1'
provided 'javax.annotation:jsr250-api:1.0'
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.android.gms:play-services-wallet:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.android.support:support-v4:23.2.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.dagger:dagger:2.0.2'
compile 'com.github.lukaspili.autodagger2:autodagger2:1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'net.steamcrafted:materialiconlib:[email protected]'
compile 'com.lorentzos.swipecards:library:[email protected]'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.github.neopixl:PixlUI:v1.0.6'
compile 'com.scottyab:secure-preferences-lib:0.1.4'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'io.card:android-sdk:5.3.0'
compile 'com.paypal.sdk:paypal-android-sdk:2.13.1'
}
任何形式的幫助或指針,不勝感激
也試圖與SDK工具的建設和各項它與相同的結果V22依賴 – Chisko
看起來像一個問題已經存在這個在[Android的bug跟蹤系統(HTTP ://b.android.com/205589)。該問題尚未解決。 –