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

How to override other proguard rules

I wish to remove a class A with the following signature package com.example class A : Base {} from a thirdpartylib.aar that comes with its own set of proguard/r8 rules one of which is -keep public class * extends com.example.Base however I wish to…
humblerookie
  • 4,717
  • 4
  • 25
  • 40
0
votes
2 answers

What does 'minifyEnabled=true' do when all configuration options are disabled?

I have a complicated build setup for an android app which basically consists of a normal android app fused together with a Xamarin/Mono project in order to include an important C# library (like this:…
0
votes
2 answers

Using R8 and proguard to remove logging, but turn off everything else

I am trying to use R8 and proguard to remove logging from the release build. The catch is that I need to this be minimally invasive at the moment, so I would like to enable R8/proguard to remove logs, but turn off everything else. IE minifcation,…
lostintranslation
  • 23,756
  • 50
  • 159
  • 262
0
votes
1 answer

Why proGuard doesn't work when its active?

I want to reduce my app size. I saw some tutorials and understood that I have to use the following code in build.gradle(app) : buildTypes { release { minifyEnabled true proguardFiles…
Nima Khalili
  • 360
  • 4
  • 20
0
votes
1 answer

Android Studio Private method becomes public final after compile

Using android studio AGP 7.0, Java 11 and minifyEnabled=true following is my method private void init(){ } after compile this becomes public final init() due to which I am getting run time crash saying LinkageError how come access specifier is…
alphanso
  • 409
  • 5
  • 22
0
votes
0 answers

Please How I can solve this probleme?

When I publish the new version (Release) of my app in my console account, he show me this message There are no unclogging files associated with this App Bundle. If you are using obfuscated code (R8/ProGuard), importing an unclogging file will…
Elrik
  • 11
  • 1
0
votes
1 answer

Proguard/R8 exception to a keep rule

I am trying to remove logging using R8/Proguard, and I used -assumenosideeffects class android.util.Log { v(...); d(...); i(...); w(...); e(...); } which works fine. The issue arrised when trying to remove the custom logging in…
Monica Ivan
  • 153
  • 1
  • 11
0
votes
1 answer

Do I need to provide a deobfuscation file if I disabled minifyEnabled

In my app level build.gradle file I have minifyEnabled = false and so I believe the app will not be obfuscated. When I go into play console to release the app, Play console says 'We recommend uploading a deobfuscation file so that your crashes and…
pnizzle
  • 6,243
  • 4
  • 52
  • 81
0
votes
0 answers

what proguard rules should I use to make javaMailApi work perfectly?

I'm using JavaMail API to send emails from my android app with OAUTH2. App working fine withOut enabling proGuard. if I set minifyEnabled true in my build.gradle file my app size reduced but failed to send emails from my app. These are the…
Venkat
  • 384
  • 1
  • 16
0
votes
1 answer

Android Gradle Plugin 4.2.x changed behavior for assumenosideeffects

I noticed a behaviour change using the Android Gradle Plugin 4.2.x regarding the ProGuard assumenosideeffects rule. I use this rule in my Android library project to remove all trace and debug calls from the SLF4J logging facility. Using Android…
Steve Benett
  • 12,843
  • 7
  • 59
  • 79
0
votes
0 answers

Android build is too slow in Jenkins after being split into modules

I tried all the methods which I found in search, but not helped. Our company app already has 8 modules. I had split one more feature, and it does not make significant build-time changes when I build in Android Studio. (about 7min 30sec) And in…
Woochan Lee
  • 324
  • 2
  • 9
0
votes
1 answer

Moshi/retrofit error with one single Int field after enabling R8 minify

Having trouble with parsing one single field from JSON response after enabling minify, with minify disabled all works correctly: retrofit API call: @FormUrlEncoded @POST("/api/test") fun test(@Field ):…
TreenD
  • 11
  • 3
0
votes
0 answers

R8: Program type already present: io.invertase.firebase.BuildConfig in react in React Native app

i have created a react native app and then try to create a release apk file by follow the link: https://reactnative.dev/docs/signed-apk-android But it's showing an error which is: > Task :app:transformClassesAndResourcesWithR8ForRelease FAILED R8:…
vjtechno
  • 452
  • 1
  • 6
  • 16
0
votes
1 answer

Obfuscation with ProGuard and NavigationComponent Safe Args

I'm trying to shrink my app size with the R8 compiler and the Proguard Rules. The problem is that the Safe Args extension uses reflection in NavArgsLazy.kt like so: override val value: Args get() { var args = cached …
0
votes
1 answer

Xamarin.Android release build crash on startup with r8

Edit: Please note the following issue does not occur when using Proguard, or in debug. Only issue with R8 in release Step to reproduce: Create a new blank Xamarin.Android application Without making any change, simply run in debug make sure the…
Shirley G
  • 352
  • 2
  • 9