2016-04-13 17 views
25

robię się tych błędów po zaktualizowałem Androida Studio i SDK: SDKBłąd kompilacji w Gradle po aktualizacji Android Studio z log4j

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.ControlPanel$1) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.ControlPanel$2) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.ControlPanel$3) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.ControlPanel$4) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.ControlPanel$5) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.ControlPanel$6) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.ControlPanel$7) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.Main$1) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.chainsaw.MyTableModel$1) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.util.LogFileParser$1) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LF5SwingUtils$1) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$1) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$10) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$11) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$12) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$13) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$14) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$15) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$16) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$17) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$18) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$19) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$2) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$20) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$21) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$22) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$23) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$24) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$25) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$26) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$27) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 
Error:compiler that did not target the modern .class file format. The recommended 
Error:solution is to recompile the class from source, using an up-to-date compiler 
Error:and without specifying any "-target" type options. The consequence of ignoring 
Error:this warning is that reflective operations on this class will incorrectly 
Error:indicate that it is *not* an inner class. 
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class 
Error:(org.apache.log4j.lf5.viewer.LogBrokerMonitor$28) that doesn't come with an 
Error:associated EnclosingMethod attribute. This class was probably produced by a 

zainstalowane:

Wszystko w tym ks. 25.1.2

Android Studio:

Android Studio 2.0 Build # AI-+143,2739321, wybudowana w dniu 5 kwietnia 2016 JRE: 1.7.0_80-b15 amd64

Plik build.gradle z projekt:

apply plugin: 'com.android.application' 

android { 

signingConfigs { 
    mulco { 
     storeFile file("somePath") 
     storePassword "..." 
     keyAlias "..." 
     keyPassword "..." 
    } 
} 

compileSdkVersion 22 
buildToolsVersion "22.0.1" 

def versionPropertiesFile = file('version.properties') 
if (versionPropertiesFile.canRead()) { 
    def Properties versionProps = new Properties() 
    versionProps.load(new FileInputStream(versionPropertiesFile)) 
    def code = versionProps['VERSION_CODE'].toInteger() + 1 
    versionProps['VERSION_CODE'] = code.toString() 
    println('count version up ' + code.toString()) 
    versionProps.store(versionPropertiesFile.newWriter(), null) 

    defaultConfig { 
     multiDexEnabled true 
     signingConfig signingConfigs.mulco 
     applicationId "com.test.mulcoandroid" 
     minSdkVersion 19 
     targetSdkVersion 22 
     versionCode code 
     versionName "1.03.01" 
    } 
} else { 
    throw new GradleException("Could not read version.properties!") 
} 

buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     signingConfig signingConfigs.mulco 
    } 
    debug { 
     debuggable true 
     signingConfig signingConfigs.mulco 
    } 
} 
packagingOptions { 
    exclude 'META-INF/LICENSE.txt' 
    exclude 'META-INF/NOTICE.txt' 
} 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.google.android.gms:play-services-maps:8.4.0' 
    compile project(':iCommonLibrary') 
    compile project(':mulcobluetooth') 
    compile project(':iScannerLibrary') 
    compile project(':iPictureLibrary') 
    compile 'com.android.support:multidex:1.0.1' 
    testCompile "junit:junit:4.12" 
    compile 'net.lingala.zip4j:zip4j:1.3.2' 
} 

i iCommonLibrary zależnej:

apply plugin: 'com.android.library' 

android { 
compileSdkVersion 22 
buildToolsVersion "22.0.1" 

defaultConfig { 
    multiDexEnabled true 
    minSdkVersion 16 
    targetSdkVersion 22 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 

packagingOptions { 
    exclude 'META-INF/LICENSE.txt' 
    exclude 'META-INF/NOTICE.txt' 
} 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.squareup.retrofit:retrofit:1.9.0' 
    compile 'com.squareup.okhttp:okhttp:2.5.0' 
    compile 'de.greenrobot:greendao:1.3.7' 
    compile 'commons-io:commons-io:2.4' 
    compile 'org.apache.commons:commons-lang3:3.3.2' 
    compile 'commons-codec:commons-codec:1.10' 
    compile 'de.mindpipe.android:android-logging-log4j:1.0.3' 
    compile 'org.slf4j:slf4j-api:1.6.4' 
    compile 'org.slf4j:slf4j-log4j12:1.6.4' 
    compile 'com.google.android.gms:play-services-location:8.4.0' 
    compile 'commons-net:commons-net:3.3' 
    compile 'com.jjoe64:graphview:4.0.1' 
    compile 'com.android.support:support-annotations:22.0.1' 
} 

build.gradle z iPictureLibrary:

apply plugin: 'com.android.library' 

android { 
compileSdkVersion 22 
buildToolsVersion "22.0.1" 

defaultConfig { 
    minSdkVersion 19 
    targetSdkVersion 22 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'it.sephiroth.android.library.horizontallistview:hlistview:1.2.2' 
    compile 'com.android.support:appcompat-v7:22.2.0' 
    compile 'com.jakewharton:disklrucache:2.0.2' 
    compile project(':iCommonLibrary') 
} 

build.gradle z iScannerLibrary:

apply plugin: 'com.android.library' 

android { 
compileSdkVersion 22 
buildToolsVersion "22.0.1" 

defaultConfig { 
    minSdkVersion 16 
    targetSdkVersion 22 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.google.zxing:core:3.2.1' 
    compile 'com.google.zxing:android-core:3.2.1' 
    compile files('libs/GrabbaSDK/Grabba driver for android v1.122.jar') 
    compile project(':iCommonLibrary') 
} 

plik build.gradle z mulcobluetooth:

apply plugin: 'com.android.library' 

android { 
compileSdkVersion 22 
buildToolsVersion "22.0.1" 

defaultConfig { 
    minSdkVersion 16 
    targetSdkVersion 22 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 

defaultConfig 
{ 
    multiDexEnabled true 
} 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'org.apache.commons:commons-lang3:3.3.2' 
    compile 'commons-io:commons-io:2.4' 
} 

Mam nadzieję, że dostarczył żadnych ważnych informacji

Jeśli ktoś coś wie ... pomóż mi! Nie mogę znaleźć niczego w tym "NEULAND"

Przepraszamy za długie pytanie ... Dziękuję za każdego, kto to wymyślił.

EDIT:

zaktualizowałem zależności do:

compile 'org.apache.logging.log4j:log4j-core:2.5' 
compile 'org.slf4j:slf4j-api:1.7.21' 
compile 'org.slf4j:slf4j-log4j12:1.7.21' 

Ale nic się nie zmieniło. Nadal mam około 500 błędów konstrukcyjnych ... Usunąłem dyszę jako odniesienie i sam ją zakodowałem ... Nic się nie stało!

EDIT:

Otwarty bilet: wydanie 206.867

https://code.google.com/p/android/issues/detail?id=206867

EDIT:

Po deinstalacji Android Studio 2.0 i 1.5.1 zainstalować ponownie pojawia się następujący ostrzeżenie:

Ostrzeżenie: Wymagana wersja programu Gradle 2.10. Obecna wersja to 2.8. Jeśli używasz opakowania gradle, spróbuj edytować plik distributionUrl w C: \ Sources \ iRecyApps \ iRecyMulco-1.0.1iOS \ gradle \ wrapper \ gradle-wrapper.properties na gradle-2.10-all.zip

Więc wersja Gradle został zaktualizowany przez 2 ...

Poinformowałem się o aktualnej wersji Gradle a to 2,12

Pobrałem i próbowałem zarówno:

trzeba zmienić Plik> Ustawienia> Kompilacje, wykonanie, wdrożenie> Narzędzia konstrukcyjne> Gradle> Ścieżka do domu Gradle

W systemie Mac OS zmień ścieżkę w Android Studio> Preferencje> Kompilacje, wykonanie, wdrożenie> Narzędzia konstrukcyjne> Gradle> Gradle home

Albo ustawić Użyj domyślnego Gradle wrapper i edycja projektu \ Gradle \ wrapper \ gradle-wrapper.properties pliki pole distributionUrl jak ten

według:

"Gradle Version 2.10 is required." Error

http://tools.android.com/tech-docs/new-build-system/version-compatibility

Still nic

+0

uzyskać ten sam nudny e rror. Próbowałem przekompilować moje zewnętrzne słoje ze źródła przy pomocy jdk7. Do tej pory nie było szczęścia. – miqueloi

+0

Czy szukasz sposobu na uruchomienie aplikacji nawet z tymi błędami? Zwykle te błędy nie są istotne i jeśli wyłączysz natychmiastowe uruchamianie, aplikacja będzie kompilować i działać poprawnie ... Przy włączonym natychmiastowym uruchomieniu, nie mogę jeszcze uruchomić mojej aplikacji ... – prom85

+0

Te błędy też się pojawiają. 325 w moim przypadku. Jeśli kliknę przycisk debugowania, uruchomi się aplikacja i działa natychmiast. Wyłączenie go nie ukryło/nie rozwiązało błędów. – Emanuel

Odpowiedz

20

Dodaj ten wiersz do proguard-rules.pro

-keepattributes EnclosingMethod 

Ten błąd może zdarzyć się prawie wszystkie klasy, która InnerClasses, myślę. (jak support.v4 itp.) Dla mnie.


Przetestowałem na studio Android 2.2
(nie testowano log4j. Testowany support.v4 itp)

build.gradle

compileSdkVersion 24 
buildToolsVersion "24.0.2" 
... 
minifyEnabled true 
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
... 
dependencies { 
    ... 
    compile 'com.android.support:support-v4:24.2.1' 
} 

getDefaultProguardFile('proguard-android-optimize.txt') działa również.

+0

gdzie jest proguard-rules.pro ?? Mam do czynienia z tym samym problemem, ale nie mogę znaleźć tego pliku. – Furqan

+3

@Furqan Pod "Skryptami gradientu" w widoku projektu. Ścieżka do pliku to (project) /app/proguard-rules.pro – Toris

+0

Powiązana edycja 215748: AGPBI zgłasza błędy zamiast ostrzeżeń Zobacz https://code.google.com/p/android/issues/detail?id=215748 (linkowany z Numer 206867 # 8). – Toris

0

Rozwiązano przez obniżenie wszystkich zależności com.android.support do 23,1 .1 w konfiguracji Gradle.

+1

Czy to nie jest uaktualnianie ...? –

+0

Nie wydaje się, aby rozwiązać ten problem w tej chwili. –

3

Miałem też do czynienia z tym samym błędem. To doprowadzało mnie do szaleństwa, ponieważ liczba błędów wynosiła> 1K. I otrzymywałem te błędy na kompilacji wydania z włączonym proguardem.

Po kilku kopaniu stwierdziłem, że dodanie -keepattributes EnclosingMethod do pliku spowoduje, że ten błąd zniknie.

Źródło: Thread i Issue #294 na GitHub.

0

W moim przypadku wystąpił ten błąd, gdy włączono Instant Run, ale po wyłączeniu Instant Run błąd zniknął. enter image description here

+0

To obejście nie jest rozwiązaniem: D –

0

napisać ten fragment kodu w proguard-rules.pro w projekcie.

-keepattributes EnclosingMethod 

Pisząc powyżej fragmencie do proguard-rules.pro plik, zasady PROGUARD faktycznie zmienia jak zajęcia są ukrywane.

0

To zadziałało dla mnie, rozpocznij nowy projekt studio Android skopiuj i wklej gradle-wrapper.properties i build.gradle (Projekt: "Nazwa projektu") w starym projekcie, w którym wystąpił błąd - w celu uaktualnienia Gradle

także dodać to w proguard-rules.pro

-keepattributes EnclosingMethod 

zaktualizować swój build.gradle (moduł: aPP) w następujący sposób

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

    } 

    dexOptions { 
     preDexLibraries = false 
    } 
+0

Nie jestem już w tym projekcie. Nie mogę tego przetestować :-( –