https://kotlinlang.org logo
#android
Title
# android
o

oday

10/09/2018, 7:55 AM
any idea why my proguard is failing here? https://pastebin.com/itxRfUKx here’s my .pro file https://pastebin.com/56EDACgH
r

radityagumay

10/09/2018, 4:32 PM
@oday you need to keep service and activity
o

oday

10/09/2018, 4:33 PM
hm
how did you gather that? and where did I say that its ok for them to be removed?
thanks for taking a look by the way
r

radityagumay

10/09/2018, 4:43 PM
@oday add 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.BackupAgent -keep public class * extends android.preference.Preference -keep public class * extends android.support.v4.app.Fragment -keep public class * extends android.support.v4.app.DialogFragment
Thats why in Android we create separation of concern to separate business logic, data retrieval, and UI logic
o

oday

10/09/2018, 4:44 PM
yea but that doesn't explain why Proguard is removing this specific activity and not any other activity
r

radityagumay

10/09/2018, 4:45 PM
in Android we cannot obfuscate an activity. You need to explicit register it in manifest
o

oday

10/09/2018, 4:45 PM
so you're saying that the reason why SettingsActivity was removed is because it wasn't mentioned in the manifest?
o

oday

10/09/2018, 4:46 PM
because it is mentioned
r

radityagumay

10/09/2018, 4:48 PM
Is that make sense to you?
o

oday

10/09/2018, 4:49 PM
no because the activity is already mentioned in the manifest
why would it remove that one and not any other activity, they're all mentioned in the manifest
r

radityagumay

10/09/2018, 4:52 PM
So, other activities are works?
o

oday

10/09/2018, 4:52 PM
of course
this is the only activity that is mentioned in a red line in my logs
and the lines wher it mentions
can't find dynamically referenced class kotlin.internal.jdk8.JDK8PlatformImplementations
really cryptic logs