2015-10-16 12 views
13

Dostaję następujący błąd próbując zbudować apk zwalniającąPro osłona budynek błąd release apk

:app:compileReleaseNdk UP-TO-DATE 
:app:compileReleaseSources 
:app:lintVitalRelease 
:app:proguardRelease 
Warning: android.support.v4.app.NotificationCompat$NotificationCompatImplBase: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification 
Warning: android.support.v4.app.NotificationCompat$NotificationCompatImplGingerbread: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification 
Warning: android.support.v4.app.NotificationCompatGingerbread: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in library class android.app.Notification 
Warning: there were 3 unresolved references to library class members. 
     You probably need to update the library versions. 
     (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember) 
:app:proguardRelease FAILED 

W build.gradle mam to:

zależności { kompilacji „com.android Wspomóż: wsparcie-v4: 23.0.0" }

i wciąż ten sam błąd, jeśli zmienię go "com.android.support:support-v13:23.0.0"

Kiedy pojawi się komunikat o błędzie: "Prawdopodobnie musisz zaktualizować wersje bibliotek." Do jakiej biblioteki się odnosi i jak ją zaktualizować?

dokumentację w błąd mówi: "If you're developing for Android and ProGuard complains that it can't find a method that is only available in a recent version of the Android run-time, you should change the build target in your project.properties file or build.gradle file to that recent version. You can still specify a different minSdkVersion and a different targetSdkVersion in your AndroidManifest.xml file."

Oto mój build.gradle, co jest jak najbardziej świeża, jak tam jest jego API 23. Więc jak mogę rozwiązać ten problem?

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.1" 

    defaultConfig { 
     applicationId "com.cequint.ecid" 
     minSdkVersion 23 
     compileSdkVersion 23 
    } 
+0

ty spróbuj zaktualizować do 'com.android.support: support-V4: 23.1.0'? –

+0

To ten sam komunikat o błędzie po aktualizacji do com.android.support:support-v4:23.1.0 – Gruntcakes

+1

Dodałem to do pro guard.cfg i zadziałało: -dontwarn android.support.v4. ** – Gruntcakes

Odpowiedz

11

dodałem to do pro guard.cfg i to działało:

-dontwarn android.support.v4.** 
+1

Czy faktycznie używasz NotificationCompat i jego program budujący? Dodałem ten plik, ale teraz otrzymuję wyjątki runtime. – Nilzor

+1

Tak Używam NotificationCompat. Czy masz na myśli, że zacząłeś używać NotificationCompat, a następnie zacząłeś otrzymywać wyjątki? Jeśli tak, może brakować zależności w pliku gradowym – Gruntcakes

+0

Okazało się, że była to niepowiązana zmiana, która spowodowała to. Nie przejmuj się mną. – Nilzor

Powiązane problemy