Singed apk gives ClassNotFoundException in android

前端 未结 2 411
陌清茗
陌清茗 2021-01-26 11:19

I am generating singed apk using eclipse Export Signed Application Package. After generating signed apk i have installed that into my device at that time I got

相关标签:
2条回答
  • 2021-01-26 12:10

    Ensure you have this on your proguard file -keep public class * extends android.app.Application like this:

     -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 * extends android.support.v4.app.Fragment
     -keep public class * extends android.widget.BaseAdapter
     -keep class com.android.vending.billing.**
    

    and make sure your proguard file is really being used.

    0 讨论(0)
  • 2021-01-26 12:17

    I had the same problem after disabling minifyEnabled true fixed the problem. if the problem only exist on signed apk. check buildtypes release on module.gradle

     buildTypes {
        release {
         // minifyEnabled true
    
        }
    }
    
    0 讨论(0)
提交回复
热议问题