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

android protobuf javalite and R8

my release build failed on the task :minifyReleaseWithR8 > Task :app:minifyReleaseWithR8 FAILED AGPBI: {"kind":"error","text":"Type com.google.protobuf.SourceContextOrBuilder is defined multiple times:…
Dmitry
  • 369
  • 4
  • 18
0
votes
1 answer

R8 and Proguard Rules

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…
Mihodi Lushan
  • 670
  • 5
  • 24
0
votes
0 answers

Xamarin.Android : Release build ok with R8 or dotfuscator but not both

Context : Xamarin.Android in VS2019 - Target : Android 9.0 (API 28) - App using AndroidX.AppCompat.App - App deployed to a Samsung SM-G935F (Android 8.0 - API 26). Linking is set to SDK Assemblies only. DEX compiler is set to dx. Dotfuscator…
0
votes
1 answer

Issue with Kotlin generic's type argument in interface after R8 obfuscation

Can't figure out how to correctly setup R8 obfuscation rule to keep my interface working. I am releasing a library. It has obfuscated code everywhere, except it's public API. There is a basic interface BaseFoo that has a type parameters in…
Den Drobiazko
  • 1,077
  • 1
  • 13
  • 33
0
votes
1 answer

Unable to remove "-ignorewarnings" from R8 Configuration (Android Proguard Issue)

I am trying to build an android app with proguard and r8 enabled. I have added "-printconfiguration full-r8-config.txt" to print the Full R8 Configuration. Problem: Even after. having zero dependencies in the build.gradle, I am getting the following…
Navjot
  • 1,202
  • 1
  • 11
  • 24
0
votes
1 answer

r8 shrinker Java.Lang.NoSuchMethodError Message=no non-static method in xamarin forms

I am using d8+r8+Multi-Dex to deploy my Xamarin Forms App. However, when enabling r8 I am getting some weired exception. I checked debug mode and I am getting this weired error. I have also configured proguard file to exempt some of the files, but…
ARH
  • 1,566
  • 3
  • 25
  • 56
0
votes
1 answer

D8 does not support main-dex inputs and outputs when compiling to API level 21 and above

I am facing this error during the build: "D8 does not support main-dex inputs and outputs when compiling to API level 21 and above" If i set minifyEnabled to true in debug buildType everything works fine, but if i set it to false i just get this…
Houskov
  • 338
  • 1
  • 9
0
votes
1 answer

R8 error with 'com.google.android.play.core.assestpacks.' on androidTest builds

When building the androidTest apk I get the multiple of the follow error: 'com.google.android.play.core.assetpacks.c' cannot be mapped to 'Lcom/google/android/play/core/assetpacks/c;' because it is in conflict with an existing class with the same…
Patrick Jackson
  • 18,766
  • 22
  • 81
  • 141
0
votes
1 answer

Where can I get the defaul proguard files for R8

I'm working on an app in Android Studio 3.6 and I've just realised that I seem to be missing the proguard-android.txt or proguard-android-optimize.txt and proguard-rules.pro files. They are defined in my build.gradle (app) file: buildTypes { …
Fat Monk
  • 2,077
  • 1
  • 26
  • 59
0
votes
0 answers

How do I get optimisation in Android without obfuscation using R8

I have some big chunks of code which test the behaviour of some incompletely documented Android APis (sigh) which seem to behave differently for different Android versions and I want to switch them in and out of debug builds (they are always removed…
0
votes
1 answer

Android R8 does not obfuscate a member name

I have this code: import static com.example.test.Utils.getPackageManagerReflection; ... public class MainActivity extends AppCompatActivity { ... @Override protected void onCreate(Bundle savedInstanceState) { …
user2342558
  • 5,567
  • 5
  • 33
  • 54
0
votes
2 answers

Android Studio R8 NullPointerException

When I update to classpath 'com.android.tools.build:gradle:3.6.1' I run into this non-understandable error. R8: The method `java.util.concurrent.Flow$Subscriber org.reactivestreams.FlowAdapters.toFlowSubscriber(org.reactivestreams.Subscriber)` does…
hannes ach
  • 16,247
  • 7
  • 61
  • 84
0
votes
1 answer

Enabling R8 requires explicit rule to keep all app package

We had explicitly disabled R8 using directive android.enableR8=false. But when I take that directive out of my gradle.properties I am finding that R8 is removing lot of application specific classes. Only way I am able to compile and run the app…
Subodh Nijsure
  • 3,305
  • 5
  • 26
  • 45
0
votes
1 answer

Android R8 obfuscation with flexJson duplicate key issue

While obfuscating the android app using R8 and minifyEnabled true in build.gradle it adds duplicate key like below in one of webservice response. Response: {"key1":"value1", ......., "key1":"value1"} it adds "key1" multiple time and flexJson throws…
takharsh
  • 2,258
  • 1
  • 21
  • 26
0
votes
1 answer

Android R8 - Missing class: com.sun.javadoc.Doclet

I'm using Android-R8 and the following R8-warnings are present: Missing class: com.sun.javadoc.Doclet the following image error, [https://i.stack.imgur.com/OmkGY.png][1] the application was build succesfully, but when it install it fails. Please…
Iqbal
  • 1
  • 1
  • 3