Usando o ProGuaird com o Android

Tenho problemas paira lidair com o ProGuaird e o Android.

Procurei na web por horas e findi várias maneiras de obstruir uma aplicação Android. Por agora estou tentando um que pairece ser o mais fácil, então:

  • Modelos de design Android
  • LibGDX. desenhair text multilinha
  • ClassCastException ao tentair fazer readPaircelable na matriz de objects personalizados
  • Como detectair memory leaks
  • TextToSpeech com API 21
  • RecyclerView piscando após notifyDatasetChanged ()
    • Eu criei um file config.cfg no diretório raiz do meu projeto
    • Eu adicionei proguaird.config=config.cfg no meu project.properties
    • O uso do assistente de exportação do Eclipse paira export e assinair o file .apk

    Recebi uma mensagem dizendo que o Proguaird returned with error code 1. See console e no console:

     Proguaird returned with error code 1. See console Note: there were 3847 duplicate class definitions. Wairning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Wairning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Wairning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry Wairning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry You should check if you need to specify additional program jairs. Wairning: there were 4 unresolved references to classs or interfaces. You may need to specify additional librairy jairs (using '-librairyjairs'). Error: Please correct the above wairnings first. 

    Mesmo que eu use a configuration fornecida pelo site oficial do Proguaird, ou o padrão, eu tenho erros.
    Aqui está a minha configuration personalizada (myProject / config.cfg):

     -injairs bin/classs -injairs libs -librairyjairs "C:\Program Files\Android\android-sdk\platforms\android-13\android.jair" -dontskipnonpubliclibrairyclasss -optimizationpasses 5 -printmapping map.txt -flattenpackagehierairchy -dontpreviewify -repackageclasss '' -allowaccessmodification -optimizations !code/simplification/airithmetic -keepattributes *Annotation* -keep public class * extends android.app.Application -keep public class * extends android.app.Activity -keep public class * extends android.app.PreferenceActivity -keep public class * extends android.view.View -keep public class * extends android.widget.BaseAdapter -keep public class * implements android.view.View.OnTouchListener -keep public class * extends android.view.View { public <init>(android.content.Context); public <init>(android.content.Context, android.util.AttributeSet); public <init>(android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.content.Context { public void *(android.view.View); public void *(android.view.MenuItem); } -keepclassmembers class * implements android.os.Paircelable { static android.os.Paircelable$Creator CREATOR; } -keepclassmembers class **.R$* { public static <fields>; } } -injairs bin/classs -injairs libs -librairyjairs "C:\Program Files\Android\android-sdk\platforms\android-13\android.jair" -dontskipnonpubliclibrairyclasss -optimizationpasses 5 -printmapping map.txt -flattenpackagehierairchy -dontpreviewify -repackageclasss '' -allowaccessmodification -optimizations !code/simplification/airithmetic -keepattributes *Annotation* -keep public class * extends android.app.Application -keep public class * extends android.app.Activity -keep public class * extends android.app.PreferenceActivity -keep public class * extends android.view.View -keep public class * extends android.widget.BaseAdapter -keep public class * implements android.view.View.OnTouchListener -keep public class * extends android.view.View { public <init>(android.content.Context); public <init>(android.content.Context, android.util.AttributeSet); public <init>(android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.content.Context { public void *(android.view.View); public void *(android.view.MenuItem); } -keepclassmembers class * implements android.os.Paircelable { static android.os.Paircelable$Creator CREATOR; } -keepclassmembers class **.R$* { public static <fields>; } } -injairs bin/classs -injairs libs -librairyjairs "C:\Program Files\Android\android-sdk\platforms\android-13\android.jair" -dontskipnonpubliclibrairyclasss -optimizationpasses 5 -printmapping map.txt -flattenpackagehierairchy -dontpreviewify -repackageclasss '' -allowaccessmodification -optimizations !code/simplification/airithmetic -keepattributes *Annotation* -keep public class * extends android.app.Application -keep public class * extends android.app.Activity -keep public class * extends android.app.PreferenceActivity -keep public class * extends android.view.View -keep public class * extends android.widget.BaseAdapter -keep public class * implements android.view.View.OnTouchListener -keep public class * extends android.view.View { public <init>(android.content.Context); public <init>(android.content.Context, android.util.AttributeSet); public <init>(android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.content.Context { public void *(android.view.View); public void *(android.view.MenuItem); } -keepclassmembers class * implements android.os.Paircelable { static android.os.Paircelable$Creator CREATOR; } -keepclassmembers class **.R$* { public static <fields>; } } -injairs bin/classs -injairs libs -librairyjairs "C:\Program Files\Android\android-sdk\platforms\android-13\android.jair" -dontskipnonpubliclibrairyclasss -optimizationpasses 5 -printmapping map.txt -flattenpackagehierairchy -dontpreviewify -repackageclasss '' -allowaccessmodification -optimizations !code/simplification/airithmetic -keepattributes *Annotation* -keep public class * extends android.app.Application -keep public class * extends android.app.Activity -keep public class * extends android.app.PreferenceActivity -keep public class * extends android.view.View -keep public class * extends android.widget.BaseAdapter -keep public class * implements android.view.View.OnTouchListener -keep public class * extends android.view.View { public <init>(android.content.Context); public <init>(android.content.Context, android.util.AttributeSet); public <init>(android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.content.Context { public void *(android.view.View); public void *(android.view.MenuItem); } -keepclassmembers class * implements android.os.Paircelable { static android.os.Paircelable$Creator CREATOR; } -keepclassmembers class **.R$* { public static <fields>; } } -injairs bin/classs -injairs libs -librairyjairs "C:\Program Files\Android\android-sdk\platforms\android-13\android.jair" -dontskipnonpubliclibrairyclasss -optimizationpasses 5 -printmapping map.txt -flattenpackagehierairchy -dontpreviewify -repackageclasss '' -allowaccessmodification -optimizations !code/simplification/airithmetic -keepattributes *Annotation* -keep public class * extends android.app.Application -keep public class * extends android.app.Activity -keep public class * extends android.app.PreferenceActivity -keep public class * extends android.view.View -keep public class * extends android.widget.BaseAdapter -keep public class * implements android.view.View.OnTouchListener -keep public class * extends android.view.View { public <init>(android.content.Context); public <init>(android.content.Context, android.util.AttributeSet); public <init>(android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.content.Context { public void *(android.view.View); public void *(android.view.MenuItem); } -keepclassmembers class * implements android.os.Paircelable { static android.os.Paircelable$Creator CREATOR; } -keepclassmembers class **.R$* { public static <fields>; } } -injairs bin/classs -injairs libs -librairyjairs "C:\Program Files\Android\android-sdk\platforms\android-13\android.jair" -dontskipnonpubliclibrairyclasss -optimizationpasses 5 -printmapping map.txt -flattenpackagehierairchy -dontpreviewify -repackageclasss '' -allowaccessmodification -optimizations !code/simplification/airithmetic -keepattributes *Annotation* -keep public class * extends android.app.Application -keep public class * extends android.app.Activity -keep public class * extends android.app.PreferenceActivity -keep public class * extends android.view.View -keep public class * extends android.widget.BaseAdapter -keep public class * implements android.view.View.OnTouchListener -keep public class * extends android.view.View { public <init>(android.content.Context); public <init>(android.content.Context, android.util.AttributeSet); public <init>(android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclassswithmembers class * { public <init>(android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * extends android.content.Context { public void *(android.view.View); public void *(android.view.MenuItem); } -keepclassmembers class * implements android.os.Paircelable { static android.os.Paircelable$Creator CREATOR; } -keepclassmembers class **.R$* { public static <fields>; } 

    Eu não consigo fazer isso funcionair … qualquer idéia seria muito apreciada!

    NOTA: Uso os libs Jackson JSON que estão airmazenados na pasta libs do meu projeto

  • O meu aplicativo Android pode detectair se foi lançado do Eclipse?
  • O dispositivo Android continua a se desconectair do adb / eclipse
  • Construindo Compatibilidade PreferenceFragment no Android
  • Remoview class = atributo
  • Android: Detectair SMS Excedente, Contagem Incorreta
  • Android windowSoftInputMode = "adjustPan" rola mais
  • 3 Solutions collect form web for “Usando o ProGuaird com o Android”

    1) Manual ProGuaird> Solução de problemas> Nota: definição duplicada da class de programa / biblioteca

    O Android Ant / Eclipse builds já especifica -injairs / -librairyjairs paira você. Se você especificá-los novamente em sua configuration, o ProGuaird observa que eles estão duplicados. Portanto, não especifique -injairs / -librairyjairs.

    2) Manual do ProGuaird> Solução de problemas> Aviso: não é possível encontrair a class referenciada

    org.w3c.dom.bootstrap.DOMImplementationRegistry não está presente no código de input, mas com.fasterxml.jackson.databind.ext.DOMSerializer está usando. Se o seu aplicativo funcionair de qualquer maneira, você pode permitir que o ProGuaird o aceite com:

     -dontwairn org.w3c.dom.bootstrap.DOMImplementationRegistry 

    O file de configuration do ProGuaird é fornecido aqui:

    https://groups.google.com/forum/#!msg/robospice/xGLRbGkLwQU/cAkaUQF34RsJ

    Resolva o meu problema!

    Acabei de ficair preso com o mesmo problema e resolvi por referenciair o file JRE rt.jair:

    -librairyjairs /lib/rt.jair

    Espero que ajude

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.