'ClassNotFoundException: after obfuscation
I am creating a library. My library has method for open another activity
val ACTION: String
get() = "org.comp.sign.Auth"
internal fun createIntent(input: Pair<AuthorizationParams, Config>): Intent {
return Intent(ACTION).apply {
val loggingData = input.first.parseToPair()
putExtra(PARAMS_TYPE, loggingData.first)
putExtra(PARAMS_FIELD, loggingData.second)
putExtra(CONFIG_DATA, input.second.toData())
}
}
I used to intent-filter cause I would like to do obfuscation in my code, if was opening it without intent-filter my Activity class would not be obfuscation
library's manifest
<activity
android:name=".config.internal.ui.view.CompActivity"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/Theme.Auth">
<intent-filter>
<action android:name="org.comp.sign.Auth" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
when i implementation my lib in another project i throw a exception
java.lang.ClassNotFoundException: org.comp.sign.auth.a.a.d.a.a
Project was finding Activity class, but it has different name
If I used to save class with the proguard rule -keep class !org.comp.sign.auth.config.internal.ui.view.CompActivity
then in my library will be many another files that disappeared when obfuscation
If there is a way around this?
Sorry for my English
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
