2016-08-09 36 views
1

Ich versuche, APK zu bauen. Aber ich stehe vor dem Fehler. Aber ich kann dies direkt mit USB-Debugging ausführen.Kann nicht beim Aufbau APK

Error:12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"(com.starmicronics.starioextension.commandbuilder.c) that doesn\u0027t come with an","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"and without specifying any \"-target\" type options. The consequence of ignoring","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"this warning is that reflective operations on this class will incorrectly","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"indicate that it is *not* an inner class.","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"warning: Ignoring InnerClasses attribute for an anonymous inner class","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"(com.starmicronics.starioextension.commandbuilder.d) that doesn\u0027t come with an","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"associated EnclosingMethod attribute. This class was probably produced by a","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"compiler that did not target the modern .class file format. The recommended","sources":[{}]} 
12:16:10.220 [ERROR] [org.gradle.api.Project] AGPBI: {"kind":"error","text":"solution is to recompile the class from source, using an up-to-date compiler","sources":[{}]} 

12:16:10.235 [ERROR] [org.gradle.BuildExceptionReporter] 
12:16:10.235 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 

Antwort

0

diese Zeile ersetzen

compile 'com.google.android.gms:play-services:8.3.0' 

zu

compile 'com.google.android.gms:play-services-analytics:8.4.0' 
compile 'com.google.android.gms:play-services-gcm:8.4.0' 
compile 'com.google.android.gms:play-services-location:8.4.0' 
compile 'com.google.android.gms:play-services-plus:8.4.0' 
0

Ich denke, dieser Fehler durch falsche dependencies aufgetreten ist, ich meine, vielleicht haben Sie nicht die dependencies oder libraries richtig eingestellt haben. bitte überprüfe sie einmal.

+0

i Bibliothek verwenden, ist es ein Problem, denke ich. siehe die Linien „(com.starmicronics.starioextension.commandbuilder.c) –

+0

ich weiß nicht, über diese Bibliothek auch ich nicht diese Bibliothek ever..sorry genutzt haben. –

1

Sie verwenden eine Bibliothek (sieht aus wie com.starmicronics...), die in einer falschen Art und Weise erstellt wurde.

können Sie entweder neu kompilieren die Bibliothek selbst von der Quelle, wenn diese vorhanden ist, oder nicht, sollten Sie in der Lage sein, um die Warnung zu verhindern, indem Sie die folgenden in der proguard Konfigurationsdatei:

-dontwarn com.starmicronics.starioextension.** 
0

ich gerade zurückgekehrt die älteren Gradle-Plugins (Gradle: 2.1.3 und Gradle-Experimental: 0.7.3) und es behob das Problem für mich.