ProGuard keep rules are the super power in reducing application size. Correctly specified, they allow tools to remove unneeded code and obfuscate applications. But what exactly do these rules mean? This session provides an answer by deep diving into what happens inside the compiler based on those rules.
Rate this session by signing-in on the I/O website here →
Watch more Android sessions from I/O ’18 here →
See all the sessions from Google I/O ’18 here →
Subscribe to the Android Developers channel →
#io18 event: Google I/O 2018; re_ty: Publish; product: Android – Android Studio, Android – Platform; fullname: Stephan Herhut; event: Google I/O 2018;
Watch more new videos about Android | Synthesized by Mindovermetal English
this final rules solution keepclassmembers didn't work and my app crashes.. android studio version is Artic Fox with 7.0.2 gradle plugin…. did i foget something?
Can anyone solve this problem
AAPT: unknown option '–proguard-minimal-keep-rules'.
aapt2 link [options] -o arg –manifest arg files…
Using build script
classpath 'com.android.tools:gradle:4.0.1'
Version : 6.1.1 gradle version in distribution Url
Great explanation!
Can progaurd obfuscate activity class ?
The previous session about the compiler: https://www.youtube.com/watch?v=gGOOkk2y_Ss
Here If I am setting -dontwarn to these warning I am able to build signed apk but that is not getting installed. kindly do the needful
I am adding these library in my gradle build and because of these libraries I am getting more than 400 warnings , please suggest me what should I do.
compile 'com.github.esafirm.android-image-picker:imagepicker:1.9.0'
compile 'com.github.bumptech.glide:glide:4.6.1'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'com.roughike:bottom-bar:2.0.2'
compile 'com.squareup.retrofit2:adapter-rxjava2:2.2.0'
compile 'javax.inject:javax.inject:1'
compile 'com.fasterxml.jackson.core:jackson-core:2.8.5'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.5'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.5'
compile "com.j256.ormlite:ormlite-android:$rootProject.ormlite"
compile "com.j256.ormlite:ormlite-core:$rootProject.ormlite"
One of the best presentations I've ever watched! nicely explained!
I would very much like to see some workable examples of how one should approach a similar problem, but on a much bigger application. e.g. Unity app where you utilise many plugins, the code of which is quite hidden from you, but need to try to keep it under the dex limit.
978Kb still include all these classes and layouts which this app will never use (e.g. abc_alert_* layout, v4 media class, notification layout, etc etc) and there seems to be no way to get rid of them. hope R8 will fix it.
Great talk 🙂
Great talk! R8 shrinks already a lot more than proguard. Couldn't find any regressions until now. 😎
I liked the walk through of how to generate better keep rules.