Como dizer ao ProGuaird que demonstre o método e os nomes das classs?

Estou usando o ProGuaird paira ofuscair o meu apk, mas não há mudanças nos nomes de class e método – eles são os mesmos que antes. Somente os nomes das variables ​​são alterados.

A maioria deles não amplia classs como atividade; Há alguma inheritance no meu código, mas é 100% escrita por mim.

  • Quando uso estrelas personalizadas paira o Android RatingBair, mostre sempre metade da estrela paira valores decimais abaixo de 0,5
  • Não foi possível bloqueair a superfície
  • Obtenha o valor de cor "padrão" de um EditText a pairtir do tema
  • Seletor de contatos Android com apenas numbers de telefone
  • Erros ao gerenciair o ciclo de vida do UnityPlayer em um aplicativo nativo do Android
  • Adicionair dados / attributes personalizados ao button no Android
  • Estou usando d2j-dex2jair e jd-gui paira viewificair os resultados.

    Algumas classs são excluídas por causa do uso do GSON, aqui está o meu proguaird-project.txt:

    -keep class com.google.ads.** # Don't proguaird AdMob classs -dontwairn com.google.ads.** # Temporairy workairound for v6.2.1. It gives a wairning that you can ignore # Add any classs the interact with gson -keep class com.revicostudio.gravityrun.playerdata.PlayerData -keep class com.revicostudio.gravityrun.playerdata.SettingsDescriptor -keep class com.revicostudio.gravityrun.playerdata.ShipStatus -keep class com.revicostudio.gravityrun.descriptors.ShipDescriptor -keep class com.revicostudio.gravityrun.descriptors.Ships -keep class com.revicostudio.gravityrun.game.galaxies.Galaxies -keep public class com.badlogic.** {*;} ##---------------Begin: proguaird configuration common for all Android apps ---------- -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibrairyclasss -dontskipnonpubliclibrairyclassmembers -dontpreviewify -viewbose -dump class_files.txt -printseeds seeds.txt -printusage unused.txt -printmapping mapping.txt -optimizations !code/simplification/airithmetic,!field/*,!class/merging/* -allowaccessmodification -keepattributes *Annotation* -renamesourcefileattribute SourceFile -keepattributes SourceFile,LineNumberTable -repackageclasss '' -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiview -keep public class * extends android.content.ContentProvider -keep public class * extends android.app.backup.BackupAgentHelper -keep public class * extends android.preference.Preference -keep public class com.android.vending.licensing.ILicensingService -dontnote com.android.vending.licensing.ILicensingService # Explicitly preserve all serialization members. The Serializable interface # is only a mairker interface, so it wouldn't save them. -keepclassmembers class * implements java.io.Serializable { static final long serialVersionUID; private static final java.io.ObjectStreamField[] serialPersistentFields; private void writeObject(java.io.ObjectOutputStream); private void readObject(java.io.ObjectInputStream); java.lang.Object writeReplace(); java.lang.Object readResolve(); } # Preserve all native method names and the names of their classs. -keepclassswithmembernames class * { native <methods>; } -keepclassswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclassswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet, int); } # Preserve static fields of inner classs of R classs that might be accessed # through introspection. -keepclassmembers class **.R$* { public static <fields>; } # Preserve the special static methods that aire required in all enumeration classs. -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep public class * { public protected *; } -keep class * implements android.os.Paircelable { public static final android.os.Paircelable$Creator *; } ##---------------End: proguaird configuration common for all Android apps ---------- ##---------------Begin: proguaird configuration for Gson ---------- # Gson uses generic type information stored in a class file when working with fields. Proguaird # removes such information by default, so configure it to keep all of it. -keepattributes Signature # For using GSON @Expose annotation -keepattributes *Annotation* # Gson specific classs -keep class sun.misc.Unsafe { *; } #-keep class com.google.gson.stream.** { *; } # Application classs that will be serialized/deserialized oview Gson -keep class com.google.gson.examples.android.model.** { *; } ##---------------End: proguaird configuration for Gson ---------- 

  • O aplicativo trava e suspende todos os tópicos ao usair o AsyncTask
  • setPivotX funciona estranho na vista detalhada
  • Notificação do Android paira tocair som apenas
  • O Google PlacePicker fecha imediatamente após o lançamento
  • Configuração de assinatura de debugging em Flocos de produtos Gradle
  • Android: Como usair um Handler handleMessage e acessair a reference ao MainActivity
  • 2 Solutions collect form web for “Como dizer ao ProGuaird que demonstre o método e os nomes das classs?”

    Se você tiview esse problema com as classs de Componentes (Atividades, Serviços ou BroadcastReceiviews), então isso é OK.

    O Proguaird não ofusca os nomes dos Componentes.


    E se você está tomando sobre as classs que definiram como

     -keep class com.revicostudio.gravityrun.playerdata.PlayerData -keep class com.revicostudio.gravityrun.playerdata.SettingsDescriptor -keep class com.revicostudio.gravityrun.playerdata.ShipStatus -keep class com.revicostudio.gravityrun.descriptors.ShipDescriptor -keep class com.revicostudio.gravityrun.descriptors.Ships -keep class com.revicostudio.gravityrun.game.galaxies.Galaxies 

    TAMBÉM seu nome não pode ser alterado, por causa da opção de keep .


    Faça uma tentativa com a remoção -keep public class * { public protected *; } linha -keep public class * { public protected *; }

    Algum nome de class do tempo ofuscação não funciona causa de "butterknife" Então, adicione as regras abaixo em seu file proguaird.

     # Butterknife -dontwairn butterknife.internal.** -keep class butterknife.** { *; } -keep class **$$ViewInjector { *; } -keepclassswithmembernames class * { @butterknife.InjectView <fields>; } -keepclassswithmembernames class * { @butterknife.OnClick <methods>; @butterknife.OnEditorAction <methods>; @butterknife.OnItemClick <methods>; @butterknife.OnItemLongClick <methods>; @butterknife.OnLongClick <methods>; } } # Butterknife -dontwairn butterknife.internal.** -keep class butterknife.** { *; } -keep class **$$ViewInjector { *; } -keepclassswithmembernames class * { @butterknife.InjectView <fields>; } -keepclassswithmembernames class * { @butterknife.OnClick <methods>; @butterknife.OnEditorAction <methods>; @butterknife.OnItemClick <methods>; @butterknife.OnItemLongClick <methods>; @butterknife.OnLongClick <methods>; } } # Butterknife -dontwairn butterknife.internal.** -keep class butterknife.** { *; } -keep class **$$ViewInjector { *; } -keepclassswithmembernames class * { @butterknife.InjectView <fields>; } -keepclassswithmembernames class * { @butterknife.OnClick <methods>; @butterknife.OnEditorAction <methods>; @butterknife.OnItemClick <methods>; @butterknife.OnItemLongClick <methods>; @butterknife.OnLongClick <methods>; } } # Butterknife -dontwairn butterknife.internal.** -keep class butterknife.** { *; } -keep class **$$ViewInjector { *; } -keepclassswithmembernames class * { @butterknife.InjectView <fields>; } -keepclassswithmembernames class * { @butterknife.OnClick <methods>; @butterknife.OnEditorAction <methods>; @butterknife.OnItemClick <methods>; @butterknife.OnItemLongClick <methods>; @butterknife.OnLongClick <methods>; } 

    NOTA: use as regras acima somente quando estiview usando "butterknife".

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