android-r8

R8 and Proguard Rules

烂漫一生 提交于 2020-07-31 04:42:14
问题 I am using https://github.com/amalChandran/trail-android this library in my android project. The animation was working perfectly fine. But, after enabling R8, the animation is not working. The library does not have any Proguard suggestion. I added the following block in one of my method, googleMap.setOnMapLoadedCallback(() -> { Route normalOverlayPolyline = new Route.Builder(mRouteOverlayView) .setRouteType(RouteType.PATH) .setCameraPosition(mMap.getCameraPosition()) .setProjection(mMap

How to use latest R8 Shrinker version

不羁的心 提交于 2020-07-17 21:02:56
问题 Because of a bug, I have used local jar file for R8 Shrinker (as recommended by R8 team) with adding the classpath to top gradle.build : classpath files($..../R8.jar/$) Now regardless of any update to the Android Studio the Gradle build still using the old version of R8 that I have used before V. 1.4.55 Recently I'm seeing that they have published newest version: V. 1.4.69 https://r8.googlesource.com/r8/ So my question is: How to configure gradle to tell to use latest version of R8, because I

How to use latest R8 Shrinker version

心不动则不痛 提交于 2020-07-17 21:01:16
问题 Because of a bug, I have used local jar file for R8 Shrinker (as recommended by R8 team) with adding the classpath to top gradle.build : classpath files($..../R8.jar/$) Now regardless of any update to the Android Studio the Gradle build still using the old version of R8 that I have used before V. 1.4.55 Recently I'm seeing that they have published newest version: V. 1.4.69 https://r8.googlesource.com/r8/ So my question is: How to configure gradle to tell to use latest version of R8, because I

R8 changes “protected” methods of abstract class to “public” without -allowaccessmodification flag

谁都会走 提交于 2020-05-15 11:47:06
问题 I have an issue with R8. In MyLib I have public abstract MyLibsClass in which I have protected methods. MyChildClass extends from MyLibsClass in MyApp and after R8's magic all protected methods (including protected abstract) in MyLibsClass are changed into public ones, and of course in MyChildClass I'm getting "attempting to assign weaker access privileges ('protected'); was 'public') issue as trying to override protected abstract methods. Additional info gradle-6.0.1 MyLib's build.gradle

Gradle : DSL element 'useProguard' is obsolete and will be removed soon

孤街醉人 提交于 2020-04-05 15:53:50
问题 Since the 3.5 update of Android Studio, I have this warning when building my app : DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard.. 回答1: Enabling R8 into the gradle.properties file: android.enableR8=true And removing "useProguard" into build.gradle : release { minifyEnabled true //useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } fixed the problem.

R8 throws NullPointerException from within AndroidStudio, but not from commandline via gradlew

蓝咒 提交于 2020-02-28 15:40:49
问题 Problem When I click on the debug icon in Android Studio, I get this NullPointerException from R8. Executing tasks: [:app:assembleDebug] in project /Users/gary/Developer/Foo/Foo-Android > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:checkDebugManifest UP-TO-DATE > Task :app:generateDebugBuildConfig UP-TO-DATE > Task :app:compileDebugAidl NO-SOURCE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:mainApkListPersistenceDebug > Task :app

Circular reference error in firebase with R8

我怕爱的太早我们不能终老 提交于 2019-12-10 16:39:27
问题 We are getting following error with Firebase and R8. [CIRCULAR REFERENCE:java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String and Method com.google.firebase.iid

How to turn off only the obfuscation in Android R8?

心已入冬 提交于 2019-12-04 10:41:47
问题 I use Android Studio 3.3 Canary 5, Gradle 4.9, gradle plugin 3.3.0-alpha05 minifyEnabled true useProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' Does't work. Edit: @JakeWharton: "You use ProGuard configurations for this, not a Gradle DSL. Disable shrinking with -dontshrink, disable obfuscation with -dontobfuscate, and disable optimization with -dontoptimize." 回答1: Following this answer, I was able to solve this issue. Instead of editing the

How to turn off only the obfuscation in Android R8?

半世苍凉 提交于 2019-12-03 12:51:55
I use Android Studio 3.3 Canary 5, Gradle 4.9, gradle plugin 3.3.0-alpha05 minifyEnabled true useProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' Does't work. Following this answer , I was able to solve this issue. Instead of editing the build.gradle file, I added -dontobfuscate to the proguard-rules.pro file. (You can configure a different proguard rules file for debug and release builds.) This skipped the obfuscation step and allowed me to make shrink'd debug builds with R8. Bharath In your gradle.properties file, add this line android