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
4
votes
1 answer

Internal error in Firestore (0.6.6-dev) because of GRPC and R8

After I updated my Firebase dependencies, my app stopped working. The crash report shown this log: java.lang.RuntimeException: Internal error in Firestore (0.6.6-dev). at…
Chandra Sekhar
  • 18,914
  • 16
  • 84
  • 125
3
votes
3 answers

Android Gradle Plugin 8.0.0 with Kotlin 1.8.20 causes OkHttp3 R8 minify problem

After upgrading to Kotlin 1.8.20 with Android Gradle Plugin (AGP) 8.0.0, I suddendly get the following error messages when running the :app:minifyProdWithR8 Gradle task : Missing class org.bouncycastle.jsse.BCSSLSocket (referenced from: void…
J. Hegg
  • 1,365
  • 11
  • 31
3
votes
0 answers

java.lang.NoSuchMethodError in AndroidX in obfuscated app

I've got a really weird error and I need an expert's eye to dig more into this issue. In releasing my application in play store, I got some crashes in Crashlytics that seems to happen only on a few devices, right after a first installation of the…
Bipi
  • 3,429
  • 1
  • 20
  • 22
3
votes
0 answers

ERROR:: R8: java.lang.OutOfMemoryError: GC overhead limit exceeded

We are working on a project which includes lot of new code being developed in terms of multiple sdk's (Being developed in-house) and when we started integrating the new code changes coming along with the sdk's developed by the teams we are getting…
3
votes
0 answers

Android R8 not obfuscating packages since Gradle plugin 7.0.X

I was obfuscating an Android library code and architecture for my costumer but since I upgraded to the Gradle plugin 7.0.X, the generated classes.jar begun to be weird... First, some classes were moved to a root a package instead of my.lib.package…
Doc_1faux
  • 141
  • 5
  • 15
3
votes
0 answers

Android app compilation warning "Runtime JAR file has version 1.4 which is older than required for API version 1.5"

I do not use Kotlin but building an app with Android Studio generates the following…
Hong
  • 17,643
  • 21
  • 81
  • 142
3
votes
2 answers

Android Studio 4.2 started to rename resources inside APK in release build

Recently I updated to Android Studio 4.2.1 from 4.1.3 and found everything in APK under res/ folder renamed(can I call it "obfuscated"?) when I build in release mode. In debug it's the same as it was in older version. I use console build with…
NoAngel
  • 1,072
  • 2
  • 18
  • 27
3
votes
2 answers

How can I get correct line numbers using retrace after R8 obfuscation?

I am using Android Studio 4.1.3 and its various bundled tools (AGP 4.1.3, Gradle 6.5, Android SDK Build Tools 31-rc2, Platform Tools 31.0.1, SDK Tools 26.1.1). I am using the default R8 tool. I am obfuscating release builds like this: release { …
tfrysinger
  • 1,306
  • 11
  • 26
3
votes
1 answer

How to understand why R8 doesn't obfuscate code

I'm building an Android app using Android Gradle Plugin 4.1.0 and Gradle 6.5.1. In my build.gradle file the flag minifyEnabled has the value true. This is my proguard-rules.pro file: #rx -dontwarn rx.** -keep class rx.** { *; } #retrofit /…
Fyodor Sherstobitov
  • 644
  • 1
  • 6
  • 19
3
votes
2 answers

R8 says type is defined multiple times: in build\.transforms and in build\tmp\kotlin-classes

I recently extracted some code from my Android application project into separate kotlin modules (the build.gradle files declare the "java-library" and "kotlin" plugins). Now, the task ':app:minifyQaWithR8' is failing with the message: AGPBI:…
duggulous
  • 2,427
  • 3
  • 23
  • 40
3
votes
1 answer

Failure Build failed with an exception after updated Android Gradle Plugin to 4.1.0

I am getting Build Failure Exception after I updated AGP to 4.1.0 and gradle wrapper to 6.5-all compileSdkVersion and targetSdkVersion is 30 ./gradlew --stacktrace assemble is throwing following error if I am setting minifyEnabled = true , it is…
Hamza Khan
  • 1,433
  • 13
  • 19
3
votes
4 answers

Failed to compile unsupported use of invokespecial

I'm trying to rebuild my project which I've written in JAVA but it has constantly failed with the error [CIRCULAR REFERENCE:com.android.tools.r8.errors.a: Failed to compile unsupported use of invokespecial] I've tried Invalidating cache cleaning…
shirin
  • 129
  • 1
  • 9
3
votes
1 answer

Execution failed for task ':app:minifyDebugWithR8'. > java.lang.NullPointerException

I'm using a jacorb library in my project and when i launch the build apk i get this error . Can someone show us how to fix this error ? please help .
3
votes
1 answer

Android R8 fragments implements but actually matches extends

Currently used version is: androidx.fragment:fragment-ktx:1.2.1. When I try to build release version, proguard (R8) show warnings like: R8: The rule `-neverclassinline public class ** implements androidx.fragment.app.Fragment` uses implements but…
Sever
  • 2,338
  • 5
  • 35
  • 55
3
votes
1 answer

R8: does not type check and will be assumed to be unreachable

When enabling android.enableR8.fullMode=true I get the following warning: AGPBI: { "kind": "warning", "text": "The method `void org.apache.commons.logging.impl.Log4JLogger.()` does not type check and will be assumed to…
Martin Zeitler
  • 1
  • 19
  • 155
  • 216