Questions tagged [android-r8]

Questions related to R8, the default shrinker tool used in the Android build process

R8 is a tool designed to replace ProGuard as the default shrinker in the Android build process

303 questions
0
votes
1 answer

Giphy SDK does not work with proguard / r8 enabled

When opening DialogFragment Gif with proguard / r8 enabled, the following message appears: "OH NO! SOMETHING WENT WRONG". What should I configure to work normally?
Vitor Ferreira
  • 1,075
  • 1
  • 14
  • 28
0
votes
1 answer

Is R8 not support applyMapping?

Use applyMapping will lead to a compile exception, like: R8: 'boolean readField(int)' already has a mapping FAILURE: Build failed with an exception. What went wrong: Execution failed for task…
0
votes
1 answer

How do you set command line flags for d8 in a Bazel project?

For example if I wanted to set --min-api to 26: https://r8.googlesource.com/r8/+/b9cb6ae34047f19320885d9e2c594f81364fa896/src/main/java/com/android/tools/r8/D8CommandParser.java#120 I've tried various .bazelrc combinations with Bazel's -s flag on to…
Tim Trueman
  • 1,513
  • 3
  • 17
  • 28
0
votes
1 answer

Is R8 / Android Gradle Plugin smart enough to keep library classes/methods needed only in test apk?

Let's say I have an app that depends on a library. This library has two methods: void usedInApp() void usedInTest() In the app I call usedInApp(). I also have an instrumentation test that calls usedInTest(). If I run instrumentation tests…
tir38
  • 9,810
  • 10
  • 64
  • 107
0
votes
0 answers

Splash Screen showing non-related layout view instead of splash layout view post migrating to Android R8 on debug mode

Splash screen showing non-related layout view instead of splash layout view. This occurred after migrating to Android R8 from ProGuard with Android Studio 3.5.1 and Gradle Plug-in 3.5.1 with (minifyEnabled & shrinkResources enabled with…
0
votes
1 answer

Android exception while building App with proguard

I want to use proguard to change name of one DigestUtils class to overcome this problem Method not found using DigestUtils in Android. This is proguard-rules.pro file (only one line, obfuscate only one file): -keep class…
Roman Nazarevych
  • 7,513
  • 4
  • 62
  • 67
0
votes
2 answers

r8 obfuscation map of class names

I am using r8 dexer to make classes.dex file from a bunch of *.class files. I would like to use obfuscation feature for all my classes, but the problem is that I also have AndroidManifest.xml file where class names are specified. So I have to know…
reardenlife
  • 317
  • 4
  • 15
0
votes
1 answer

Android Studio 3.5 : This method contains native references and will be minified. [KeepMissing]

yesteday I update Android Studio to the new 3.5 version. After restarting my PC, Android Studio wasn't able to compile my app any more. I have 3 errors like this: App.java:29: Error: This method contains native references and will be minified.…
neo87
  • 51
  • 2
  • 6
0
votes
1 answer

R8 is still in stacktrace even though it is turned off in properties

I'm using android plugin 3.4.2, gradle 5.0. I turned off R8 in gradle.properties android.enableR8 = false But I still got a stacktrace where R8 is among packages. Does it mean that R8 somehow still works, or it just dexer in r8 package? I know how…
Maksim Turaev
  • 4,115
  • 1
  • 29
  • 42
0
votes
1 answer

NoClassDefFoundError: error when generating apk

migrate my application to android x and gradle 5 the moment that I send to generate the apk or to install gives me this error Caused by: java.lang.NoClassDefFoundError: com/android/tools/r8/dex/ApplicationReader Build.graddle buildscript { …
0
votes
2 answers

Gradle ignores testProguardFile when running Android instrumentation

I'm trying to run instrumentation tests on a release build type. My setup is as follows: Android Studio - 3.4.1 Android Gradle Plugin - 3.4.1 Gragle - 5.4.1 R8 - Enabled (default) Relevant build.gradle snippet: testBuildType "release" …
0
votes
1 answer

Stacktrace is obfuscated in the Google Play console

I have a few apps on the store, and I'm seeing occasional crash reports. However, the stacktrace remains obfuscated, even though the mapping file is showing as having been uploaded. I'm using Android Studio, including the default settings for the…
Charlie
  • 51
  • 5
0
votes
1 answer

Android: Build failure when using R8

I'm trying to build my project with R8 enabled. However, I get this error: ./gradlew assembleAndroidTest Caused by: com.android.tools.r8.utils.AbortException: Error: void com.cresta.Controller.ensureSaneDefaults() is not being kept as F, but…
Gaurav Arora
  • 17,124
  • 5
  • 33
  • 44
0
votes
2 answers

Gradle 5.1.1 update breaks my proguard rules in Android

I updated my gradle version to 5.1.1 and suddenly it broke some of my proguard rules (app crashes). An example would be this library that I use: https://github.com/LeonardoCardoso/Android-Link-Preview I applied the proguard rule: -keeppackagenames…
Mike
  • 1,313
  • 12
  • 21
0
votes
1 answer

Android new shriking tool R8 does not reflect any change in APK size

When I add R8 to shrink the android dex size it is not working. I've added this following line: gradle.properties: android.enableR8=true When tried to analyse my code I could not find any difference in my apk size. Is it something else I am…
srisindhu saride
  • 391
  • 6
  • 25
1 2 3
20
21