简体   繁体   中英

Android - Signed apk not running

I am getting strange error while running exported apk using Android Tool in eclipse. In app i am using parse notification. While i run app from eclipse all are working file and if I export signed apk app crashes. Here is logcat code link - Here is logcat

I am not able to upload logcat here therefore i share link for it

If I block parse notification code, all going fine,. Please help and thanks in advance.

please check this.

-keepattributes SourceFile,LineNumberTable
-keepnames class com.parse.** { *; }

 # Required for Parse
 -keepattributes *Annotation*
 -keepattributes Signature
 -dontwarn android.net.SSLCertificateSocketFactory
 -dontwarn android.app.Notification
 -dontwarn com.squareup.**
 -dontwarn okio.**

Also add this

   -keep class com.facebook.** { *; }
   -keep class com.parse.** { *; }
   -dontwarn com.parse.**
   -dontnote com.parse.**

Let me know if it did not solve your problem :)

Here is your solution, replace your progaurd code with this on -

-optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/ ,!class/merging/ -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.BroadcastReceiver -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

keep all classes that might be used in XML layouts

-keep public class * extends android.view.View -keep public class * extends android.app.Fragment -keep public class * extends android.support.v4.Fragment

keep all public and protected methods that could be used by java reflection

-keepclassmembernames class * { public protected ; } -keepclasseswithmembernames class * { native ; } -keepclasseswithmembernames class * { public (android.content.Context, android.util.AttributeSet); } -keepclasseswithmembernames class * { public (android.content.Context, android.util.AttributeSet, int); } -keepclassmembers enum * { public static **[] values(); public static ** valueOf(java.lang.String); } -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; }

# Keep source file names, line numbers, and Parse class/method names for easier debugging -keepattributes SourceFile,LineNumberTable -keepnames class com.parse.** { *; }

Required for Parse

-keepattributes Annotation -dontwarn com.parse.** -dontwarn org.apache.http.** -dontwarn android.support.v4.app.** -dontwarn com.android.volley.** -dontwarn com.activate.gcm.** -dontwarn com.google.android.gms.** -dontwarn org.joda.** -dontwarn com.squareup.picasso.**

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM