2015-01-14 11 views
5

ProGuard ferma con un sacco di avvertimenti:avvertimenti ProGuard: c'erano 7 riferimenti non risolti ai membri della classe di programma

Warning: there were 1221 unresolved references to classes or interfaces. You may need to add missing library jars or update their versions. If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options. (http://proguard.sourceforge.net/manual/troubleshooting . html#unresolvedclass)

Warning: there were 37 instances of library classes depending on program classes. You must avoid such dependencies, since the program classes will be processed, while the library classes will remain unchanged. (http://proguard.sourceforge.net/manual/troubleshooting . html#dependency) Warning: there were 7 unresolved references to program class members. Your input classes appear to be inconsistent. You may need to recompile the code. (http://proguard.sourceforge.net/manual/troubleshooting . html#unresolvedprogramclassmember)

Error: Please correct the above warnings first.

Ma il mio vaso viene eseguito correttamente. Non ho molta familiarità con l'impostazione proguard. Qualche suggerimento?

risposta

3

Ho intenzione di citare una parte molto pertinente della tua domanda (ovvero la risposta).

If your code works fine without the missing classes, you can suppress the warnings with '-dontwarn' options

Quindi, eseguirlo con -dontwarn dal mio vaso viene eseguito correttamente.

documentata (per la tua domanda) here c'è anche l'opzione -libraryjars che può essere utilizzato se si dispone di librerie esterne che si desidera aggiungere.

2

La cosa migliore da fare qui è aggiungere le librerie nel file di configurazione progyard. Nella parte superiore di esso, subito dopo i percorsi di ingresso e di uscita vaso, mettere le linee come questo, uno per ogni barattolo biblioteca si utilizza:

-libraryjars 'path/to/jar/file.jar' 

Questo dice Proguard per caricare le classi mancanti dai barattoli specificati.