Implementación de Proguard Security con mi APK

Quiero configurar proguard con mi aplicación. Pero al hacerlo estoy recibiendo los siguientes problemas:

[2013-09-24 12:27:46 - DemoProguard] Proguard returned with error code 1. See console [2013-09-24 12:27:46 - DemoProguard] Warning: com.google.android.gms.internal.bn$b: can't find referenced method 'android.view.Display getDisplay()' in class android.view.View [2013-09-24 12:27:46 - DemoProguard] Warning: com.google.android.gms.internal.bn$b: can't find referenced method 'void removeOnGlobalLayoutListener(android.view.ViewTreeObserver$OnGlobalLayoutListener)' in class android.view.ViewTreeObserver [2013-09-24 12:27:46 - DemoProguard] You should check if you need to specify additional program jars. [2013-09-24 12:27:46 - DemoProguard] Warning: there were 2 unresolved references to program class members. [2013-09-24 12:27:46 - DemoProguard] Your input classes appear to be inconsistent. [2013-09-24 12:27:46 - DemoProguard] You may need to recompile them and try again. [2013-09-24 12:27:46 - DemoProguard] Alternatively, you may have to specify the option [2013-09-24 12:27:46 - DemoProguard] '-dontskipnonpubliclibraryclassmembers'. [2013-09-24 12:27:46 - DemoProguard] java.io.IOException: Please correct the above warnings first. [2013-09-24 12:27:46 - DemoProguard] at proguard.Initializer.execute(Initializer.java:321) [2013-09-24 12:27:46 - DemoProguard] at proguard.ProGuard.initialize(ProGuard.java:211) [2013-09-24 12:27:46 - DemoProguard] at proguard.ProGuard.execute(ProGuard.java:86) [2013-09-24 12:27:46 - DemoProguard] at proguard.ProGuard.main(ProGuard.java:492) [2013-09-24 12:40:50 - DemoProguard] Proguard returned with error code 1. See console [2013-09-24 12:40:50 - DemoProguard] Warning: com.google.android.gms.internal.bn$b: can't find referenced method 'android.view.Display getDisplay()' in class android.view.View [2013-09-24 12:40:50 - DemoProguard] Warning: com.google.android.gms.internal.bn$b: can't find referenced method 'void removeOnGlobalLayoutListener(android.view.ViewTreeObserver$OnGlobalLayoutListener)' in class android.view.ViewTreeObserver [2013-09-24 12:40:50 - DemoProguard] You should check if you need to specify additional program jars. [2013-09-24 12:40:50 - DemoProguard] Warning: there were 2 unresolved references to program class members. [2013-09-24 12:40:50 - DemoProguard] Your input classes appear to be inconsistent. [2013-09-24 12:40:50 - DemoProguard] You may need to recompile them and try again. [2013-09-24 12:40:50 - DemoProguard] Alternatively, you may have to specify the option [2013-09-24 12:40:50 - DemoProguard] '-dontskipnonpubliclibraryclassmembers'. [2013-09-24 12:40:50 - DemoProguard] java.io.IOException: Please correct the above warnings first. [2013-09-24 12:40:50 - DemoProguard] at proguard.Initializer.execute(Initializer.java:321) [2013-09-24 12:40:50 - DemoProguard] at proguard.ProGuard.initialize(ProGuard.java:211) [2013-09-24 12:40:50 - DemoProguard] at proguard.ProGuard.execute(ProGuard.java:86) [2013-09-24 12:40:50 - DemoProguard] at proguard.ProGuard.main(ProGuard.java:492) 

Aquí está mi archivo proguard-text

 # To enable ProGuard in your project, edit project.properties # to define the proguard.config property as described in that file. # # Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in ${sdk.dir}/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the ProGuard # include property in project.properties. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: -dontskipnonpubliclibraryclassmembers # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} 

Trate de añadir estas líneas en primer lugar en nuestro archivo proguard.cfg en su proyecto como se muestra a continuación:

 -ignorewarnings 

Si tiene alguna anotación en su proyecto, por favor, agregue la siguiente línea como a continuación

 -keepattributes *Annotation* 

Y asegúrese de que su archivo gradle tenga minifyEnabled como false

  • Proguard con OrmLite en Android
  • ¿Debo mantener android.support.v4.app.Fragment y sus clases derivadas al crear una versión de lanzamiento de mi aplicación?
  • Proguard.cfg Falta
  • Cómo proteger la llamada a webservice en Android
  • Proguard-project.txt no se encuentra en android studio
  • Definición de Android Proguard Duplicate
  • ProGuard: no puede encontrar la clase referenciada com.google.android.gms.R
  • Desmarque TODOS los elementos de BottomNavigationView sin elemento ficticio o Reflexión
  • Problemas con ProGuard para Android con Parse 1.3.5 jar
  • Problemas con ProGuard y AdMob
  • "No se puede encontrar la clase referenciada" con Proguard y Kotlin
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.