Effective ProGuard keep rules for smaller applications (Google I/O '18)

10
3



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

Nguồn: https://alimentproteine.com/

Xem thêm bài viết khác: https://alimentproteine.com/cong-nghe/

10 COMMENTS

  1. 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

  2. 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"

  3. 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.

  4. 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.

LEAVE A REPLY

Please enter your comment!
Please enter your name here