java - exporting APK with Proguard fails in real device install -
If I export it to Android studio in my app then trigger = true and install APK on the real device The app stops and says: Unfortunately [your app is closed.
What is the problem? I left the proguard-rules.txt file in the default state:
# Add specific Progred rules of the project here. # By default, the flags of this file # are specified by Flags / App / Android Studio.AP / SDK / Tools / Project / Programming-Android. Txt # can add # You can edit the path and order included by changing ProGuard # property in the project. Properties # # For more information, see # http://developer.android.com/guide/developing/tools/proguard.html ## Place any project specific option here: # if your project uses WebWee with JS , Then specify the full # qualified category name for the following #and Recommend JavaScript Interface # class: # -keepclassmembers class fqcn.of.javascript.interface.for.webview {# public *; #}
Without Proguard my app is installed and runs perfectly.
You can do this
- Public category * Android View. View {public & lt; Init & gt; (Android.content.Context); Public & lt; Init & gt; (Android.content.Context, android.util.AttributeSet); Public & lt; Init & gt; (Android.content.Context, android.util.AttributeSet, int); Public Zero Set * (...); } -keepclasseswithmembers class * {public & lt; Init & gt; (Android.content.Contxt, android.util.AttributeSet); } -keepclasseswithmembers class * {public & lt; Init & gt; (Android.content.Contxt, android.util.AttributeSet, int); } -keepclassmembers class * android.os implements. Portable {Fixed android.os.Parscelable $ Creator Creator; } -keepclassmembers class **. R $ * {Public Stabilized & lt; Field & gt ;; }
Comments
Post a Comment