android - Proguard obfuscates Activity names in a merged library manifest -


i have several application projects use common library project. tried moving common activity declarations each application project's androidmanifest.xml library's manifest, , enabled manifest merging manifestmerger.enabled=true in project.properties.

everything works fine in debug build, release builds (obfuscated proguard) fail activitynotfoundexception. because proguard obfuscating names of activities declared in library manifest, not in application manifest.

i have examined merged bin/androidmanifest.xml file application project, , correctly has activity names listed.

can please suggest workaround?

the standard ant build process invokes aapt tool create proguard configuration (bin/proguard.txt) preserves necessary classes (e.g. activities deems used). if doesn't work project structure (maybe bug or unsupported case), can preserve classes in proguard-project.txt:

-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 

if resulting application still missing other classes, can find more manual configuration in proguard manual > examples > a complete android application.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -