Ich versuche, Proguard über die integrierte Proguard-Unterstützung im Paket-Explorer zu verwenden Export> Android-Anwendung exportieren. Das Hauptprojekt verwendet ein Bibliotheksprojekt, das wiederum die Android-Kompatibilitätsbibliothek verwendet, es verwendet diese Kompatibilitätsbibliothek auch selbst. Im Grunde wie folgt:Proguard mit Android-Projekt mit (Kompatibilität) Bibliotheken
BaseLibraryProject BaseActitivity Libs: android-support-v4.jar Hauptprojekts verwendet Bibliothek BaseLibraryProject Libs: android-support-v4.jar
Diese App läuft OK sowohl auf Geräte und simluators . jedoch emittiert Proguard viele Warnungen und existiert mit Code 1.
Dies ist das letzte Bit des Proguard bezogenen Eintrag:
[2012-04-09 14:19:49 - MainProject] Warning: android.support.v4.widget.SearchViewCompatHoneycomb: can't find referenced class android.widget.SearchView
[2012-04-09 14:19:49 - MainProject] Warning: android.support.v4.widget.SearchViewCompatHoneycomb: can't find referenced class android.widget.SearchView
[2012-04-09 14:19:49 - MainProject] Warning: android.support.v4.widget.SearchViewCompatHoneycomb: can't find referenced class android.widget.SearchView$OnQueryTextListener
[2012-04-09 14:19:49 - MainProject] Warning: android.support.v4.widget.SearchViewCompatHoneycomb: can't find referenced class android.widget.SearchView
[2012-04-09 14:19:49 - MainProject] Warning: android.support.v4.widget.SearchViewCompatHoneycomb$1: can't find referenced class android.widget.SearchView$OnQueryTextListener
[2012-04-09 14:19:49 - MainProject] Warning: android.support.v4.widget.SearchViewCompatHoneycomb$1: can't find referenced class android.widget.SearchView
[2012-04-09 14:19:49 - MainProject] Warning: there were 131 unresolved references to classes or interfaces.
[2012-04-09 14:19:49 - MainProject] You may need to specify additional library jars (using '-libraryjars').
[2012-04-09 14:19:49 - MainProject] Warning: there were 29 unresolved references to program class members.
[2012-04-09 14:19:49 - MainProject] Your input classes appear to be inconsistent.
[2012-04-09 14:19:49 - MainProject] You may need to recompile them and try again.
[2012-04-09 14:19:49 - MainProject] Alternatively, you may have to specify the option
[2012-04-09 14:19:49 - MainProject] '-dontskipnonpubliclibraryclassmembers'.
[2012-04-09 14:19:49 - MainProject] java.io.IOException: Please correct the above warnings first.
Wie Sie sehen: es ist nicht die Kompatibilitätsbibliothek finden.
Dies ist der Beginn der proguard.cfg Datei mit beiden -libraryjars und -dontskipnonpubliclibraryclassmembers enthalten:
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
-libraryjars libs/android-support-v4.jar
macht keinen Unterschied machen. Ich habe alle möglichen Kombinationen aus dem Hinzufügen der Bibliothek zum BaseLibrary-Projekt/MainProject, vollständig qualifizierte Pfadnamen, ausprobiert. Nichts scheint zu helfen.
Die meisten Stackoverflow-Fragen auf Proguard scheinen sich mit der Einrichtung von Ant zu beschäftigen. Irgendeine Idee, was dieses Problem verursachen könnte und wie Proguard an diesem Projekt arbeitet, das mehrere Bibliotheken verwendet?
Vielen Dank im Voraus,
Nur die Zeile proguard.config = $ {sdk.dir} \ tools \ proguard \ proguard-android.txt: proguard-project.txt und das Löschen der proguard.cfg hat es funktioniert –