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

using R8 to hide private and internal methods from android library

i have written android library. but when i integrate aar into client app. i can actually see private/internal/public methods of "public" classes. what i expect is: it should show only "public" methods of "public" classes. i am using R8, for release…
Matrix
  • 7,477
  • 14
  • 66
  • 97
0
votes
1 answer

Firebase test lab result : No properties to serialize found on class com.example.poultryscope.ItemModel

My application works well in debug mode, I Generated a signed Android app bundle and tested it by firebase test lab but app crashed during testing. the test shows Fatal exception : java.lang.RuntimeException: No properties to serialize found on…
0
votes
0 answers

The application does not work after publishing in the Google market. R8

I can’t understand why the code stopped working correctly after being published in the Google market in the release branch. Step 1. Problem of the following character: 1. Turn on "minifyEnabled true", configure the proguard-rules.pro file. I write…
0
votes
0 answers

Android : R8 codeshrink issues reported in crashlytics

I have tried to debug this crash but couldn't get the exact cause, but this is happening across the app. Fatal Exception: java.lang.NullPointerException at fm.e.run(R8$$SyntheticClass:7) at…
codewithdk
  • 1,290
  • 1
  • 10
  • 23
0
votes
0 answers

Android Kotlin Proguard Obfuscation of Kotlin Default Impl

I use Android + Kotlin + Proguard Code inferface Authentication { val authenticated: Boolean val lastAuthentication: Instant fun authenticate(force: Boolean = false): Flow suspend fun revokeAccess() } And an implementation of that…
true-mt
  • 347
  • 3
  • 12
0
votes
3 answers

How can I disable renaming names of fragments classes during obfuscation?

Which ProGuard/R8 rules to use? Currently only Activites aren't renamed I need to keep names of Fragment for screens logging as well but the code itself in fragments should be obfuscated
user924
  • 8,146
  • 7
  • 57
  • 139
0
votes
0 answers

Moshi - issue serializing library class after minification

Recently ran into an issue with library, which uses moshi to create runtime TypeAdapter for serialization/deserialization. The library seems to work fine with R8 disabled, but after enabling it I ran into an error message: Fatal Exception:…
Lubos Mudrak
  • 651
  • 1
  • 8
  • 26
0
votes
0 answers

R8 minifyEnabled ExceptionInInitializerError

I get this error when building for release. This happens for release only. The error doesn't appear for debuggable or when I set the flag -dontobfuscate How can I tell which classes are being stripped? java.lang.ExceptionInInitializerError at…
arshcaptano
  • 51
  • 1
  • 3
  • 3
0
votes
0 answers

Here SDK for Android: java build errors in Xamarin Release build when use r8

We have a Xamarin Forms Application updated to 5.0 all the builds are successful including the Android binding libraries. Switched from Proguard to r8 due to multiple errors occurring on release build. The main issue we have is on release mode where…
0
votes
0 answers

why android compiler generate different MethodRef for same code

i happened to encounter some wired compiled bytecode which i believe both sharing the same source code like below class SomeWebView extends WebView { SomeWebView() { this.getSettings(); } } version 1 (above code write in app a)…
Minami
  • 963
  • 6
  • 21
0
votes
1 answer

How to properly obfuscate code in android studio?

I am trying to obfuscate the debug build in android studio Chipmunk (buildToolsVersion "30.0.3", compileSdkVersion 32, targetSdkVersion 32, gradle:7.2.1). I have the following code in my build.gradle file, buildTypes { release { …
Sujith S Manjavana
  • 1,417
  • 6
  • 33
  • 60
0
votes
1 answer

:minifyReleaseWithR8 fails for library modules with no property value available

I'm unable to find the cause of the error: Could not determine the dependencies of task ':analytics:minifyReleaseWithR8'. > Cannot query the value of this property because it has no value available. My configuration: Gradle convention file named…
Nek.12
  • 340
  • 4
  • 13
0
votes
1 answer

Proguard / R8 rule to keep package-private class members

For compiling an .aar library in an Android Java project I need to protect a static package-private method of a class to be protected from removal by R8: public final class MyClass { ... static void myStaticMethod(...){ ... } ... } I…
Nantoka
  • 4,174
  • 1
  • 33
  • 36
0
votes
1 answer

Why is an in used function still shown in usage.txt of proguard output?

I have the following code class MainActivity : AppCompatActivity() { private val obfuscatedClass = MyObfuscatedClass() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) …
Elye
  • 53,639
  • 54
  • 212
  • 474
0
votes
1 answer

How to provide an Android library without exposing the source code

Sometimes when you debug an Android library code, you can see the library's implementation, but there are other libraries where when you try to check the implementation of any function, you will see that the body of all the functions contains one…