Skip to content Skip to sidebar Skip to footer

"unknown Source" In Release Apk

Everything in my debug APK works just fine. However, when I export my APK and install it, everything works fine until I make a call to a referenced library. E/AndroidRuntime(32571)

Solution 1:

The problem was with the Google Gson library. Proguard converts class names into obfuscated ones rendering json conversion buggy.

In order to solve this problem, make sure to have the following in your proguard-project.txt

# the classes that you use for Gson conversion
-keep classcom.yourapp.objects.** { *; }

# without this line, I was having ClassCastException
-keepattributes Signature, *Annotation*

I hope this helps someone =)

Solution 2:

If you haven't defined your libraries in proguard-project.txt then you can add like this

-libraryjars /libs/smack.jar -libraryjars /libs/libphonenumber-5.0v1.5.jar

Android obfuscate app using proguard keeps obfuscating library jars - or is it?

Post a Comment for ""unknown Source" In Release Apk"