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
1
vote
0 answers

Can't sign APK with R8

I am preparing to deploy my app to the playstore, my current expertise is based on proguard, It seems that now we have to use R8, so I followed the guide on the developer site for Android, as R8 can use the same pro guard files and configurations, I…
Otto Cheley
  • 552
  • 9
  • 20
1
vote
1 answer

java.lang.VerifyError on an obfuscated Android library

We're getting a strange exception for a smaller amount of devices where, apparently the class is not verified because of a method. Unfortunately we're not able to reproduce this with our devices and the stack trace is taken from Fabric. The stack…
Furkan Yurdakul
  • 2,801
  • 1
  • 15
  • 37
1
vote
1 answer

Evernote Android SDK library throws java.lang.VerifyError under R8

Facing notorious java.lang.VerifyError. Initially problem showed up in Fabric. Was able to reproduce (with identical stacktrace) once set minifyEnabled true for debug build. Caused by java.lang.VerifyError: Verifier rejected class…
Den Drobiazko
  • 1,077
  • 1
  • 13
  • 33
1
vote
0 answers

meaning of numbers in the proguard mapping

I can see that the following lines are present in the proguard mapping that got generated after building my application: 1000:1000:void onCreate(android.os.Bundle):44 -> onCreate 2000:2000:void onClick(android.view.View):101 ->…
avin
  • 459
  • 5
  • 14
1
vote
1 answer

Deobfuscating file doesn't work with this exception

I uploaded the deobfuscate file to the console but... deobfuscate files seems to work incorrectly with this exception. I'm obfuscating the code with the new R8 system instead proguard because I'm using the last android studio, but this happened also…
NullPointerException
  • 36,107
  • 79
  • 222
  • 382
1
vote
0 answers

Duplicate jar entry

I'm trying to obfuscate my code and make a release build but when i do i'm getting a Duplicate Jar entry with proguard or Program type already present when using R8. The class it's complaining about I overrode by specifiying the class in it's…
L7ColWinters
  • 1,342
  • 1
  • 14
  • 31
1
vote
0 answers

Android and Akka 2.5 integration

I've been trying to use Akka 2.5 in an Android app for a while but didn't succeed at it. I've encountered many issues : First failure when using Android standard library was an IndexOutOfBound on R8 when referencing Akka Methods in…
Ismail H
  • 4,226
  • 2
  • 38
  • 61
0
votes
1 answer

Enable R8 when using moshi-kotlin-codegen

I am trying to enable R8 for my project : https://github.com/alirezaeiii/TMDb-Compose-Playground buildTypes { release { minifyEnabled true shrinkResources true proguardFiles…
Ali
  • 9,800
  • 19
  • 72
  • 152
0
votes
2 answers

Build Issue in Release Mode with R8, After Xamarin Android Project Upgrade to 13.0

I've upgraded my Xamarin Android project from SDK version 12.0 to 13.0. After that I'm getting below error on building the project in Release mode. The following error occurs 50 times: R8 : Validation error : A type variable is not in scope.…
Saksham Chaudhary
  • 519
  • 1
  • 4
  • 14
0
votes
1 answer

R8/ProGuard rule to keep org.pytorch.PyTorchAndroid after java.lang.ClassNotFoundException: Didn't find class

When launching my Flutter app using the pytorch_mobile plugin with minifyEnabled and shrinkResources set to true, I get the following error: ... F/xxx(25186): java_vm_ext.cc:594] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with…
luvzfootball
  • 710
  • 1
  • 9
  • 21
0
votes
1 answer

R8/Proguard keep parent package without keeping a specific child

I am using a library or a dependency that has a security problem in one of its sub-packages. Assume that the name of the package is parent and the name of the sub package that is causing the problem is child, unfortunately I have to -keep the…
Mohammad Elsayed
  • 1,885
  • 1
  • 20
  • 46
0
votes
1 answer

Fatal Exception When Enabling R8 in Android App with Jetpack Compose and Coroutines - ClassCastException Issue

I'm currently developing an AndroidTV application using Jetpack Compose, Retrofit, and Coroutines. To test the performance issues in my project, I need to enable R8 mode. However, when I do so, I encounter the following error: Fatal Exception:…
0
votes
1 answer

Sealed class objectInstance R8 null problem

I have a selaed class that contains object like; sealed class Item(val route:String,val showTopBar: Boolean = false) { object Example1: Item(route = "example1") object Example2: Item(route = "example2", showTopBar = true) } When I want to get…
0
votes
2 answers

How to keep some com.google.android.play.core.* classes reported missing by R8 during a release build of a Flutter app?

When I build an APK it comes out to be 30MB. I recently upgraded to AGP 8.1 from 7.4, not sure if that screwed up something. The Task :app:minifyReleaseWithR8 FAILED fails. The short message is: Missing classes detected while running R8. Please add…
Csaba Toth
  • 10,021
  • 5
  • 75
  • 121
0
votes
1 answer

Conflict between library and program classes during R8 optimization in Android - multi module project

I am encountering an issue related to R8 ofuscation in my app application. During the build process, I receive the following error message: AGPBI: {"kind":"warning","text":"The following library types, prefixed by java., are present both as library…