Questions tagged [proguard]

ProGuard is a tool to shrink, optimize, obfuscate, and preverify Java classes. It is included in the Android SDK.

Filter by
Sorted by
Tagged with
1 vote
1 answer
19 views

Codename One - ProGuard - Duplicate jar entry

I have an existing Codename One application and wish to add some data from a GTFS real-time data feed. All is well, until I add the following statements: try { FeedMessage....
stylsy's user avatar
  • 63
0 votes
1 answer
35 views

R8 and ProGuard: Missing class error in data class that is using @Keep annotation

For some reason, one of our data class model is being obfuscated or removed during build and we had to add @Keep annotation to it to work. @Keep data class CommonNotification( val title: String, ...
Bitwise DEVS's user avatar
  • 2,449
0 votes
0 answers
12 views

Android release build is not equivalent to debug build

I'm working on an android app which works just fine on debugging, while throwing different kinds of exceptions and misfunctions on release build, and again, works fine with debug version. Proguard ...
IliyaTi's user avatar
2 votes
0 answers
73 views

java.lang.ClassNotFoundException: Didn't find class "androidx.compose.runtime.PrimitiveSnapshotStateKt"

I'm currently working on a task manager app. However, when the app is in debug variant, everything runs normally and compiles with no problem. But when I switch to the release variant, I get this ...
Marco Portacio's user avatar
1 vote
1 answer
49 views

java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType in the pre launch report

I updated my app recently and I've got the Google Play pre-launch report found this issue on 9 tested devices Exception java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang....
Dr Mido's user avatar
  • 2,438
0 votes
0 answers
22 views

proguard.conf option -keep and -dontwarn not work

I'm building a regular uber-jar (not native executable file) based on Quarkus. and I also wanna obfuscate the uber-jar. so I build the jar file with ./gradlew quarkusBuild -Dquarkus.package.type=uber-...
Archsx's user avatar
  • 774
-1 votes
0 answers
26 views

Exclude everithing but 1 package with ProGuard

Pretty self explinatory, maven is giving me an error when I build that I think is coming from a library, I think so because I don't use kotlin in my project. https://paste.md-5.net/hoxuxojoqi.md I've ...
Willyema's user avatar
0 votes
1 answer
30 views

Release build Prugoard/R8 java.lang.ClassCastException at androidx.lifecycle.a.create(SourceFile:9)

I don't really understand which library causes the issue in release build with minifyEnabled = true, something with androidx.lifecycle.... or androidx.navigation.compose? I upgraded navigation compose ...
user924's user avatar
  • 8,341
0 votes
0 answers
17 views

Android minify end up with ktor not deserializing nested objects

I tired to activate minifying in my android project with the code below release { isDebuggable = true isMinifyEnabled = true isShrinkResources = true ...
T K's user avatar
  • 1
0 votes
1 answer
38 views

Jetpack Compose - rememberSaveable stops working with ProGuard/R8 on

I've been struggling with trying to get ProGuard/R8 minification to not break my builds for several days now, and I can't seem to find any info online about this latest problem: in my debug builds, ...
Alexis Purslane's user avatar
0 votes
1 answer
24 views

Which ProGuard Rules are need for using GSON with Google Maps?

This started after upgrading my Gradle. Creating test builds of my app works fine. It's when I create a Release Build that my app crashes with the following error message: FATAL EXCEPTION: main ...
JonR85's user avatar
  • 700
0 votes
1 answer
64 views

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 ...
Ali's user avatar
  • 9,850
0 votes
1 answer
33 views

How to obfuscate Kotlin Multiplatform code?

To obfuscate Kotlin code we use the isShrinkResources = true property in the build.gradle file. But for the KMP library, I get the following exception: com.android.builder.errors.EvalIssueException: ...
Ivan Šimović's user avatar
0 votes
0 answers
25 views

Does proguard support multirelease jars?

We have a multirelease .jar that contains different .class files under META-INF/versions (e. g. META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class). After running proguard in version ...
user27772's user avatar
  • 522
1 vote
0 answers
35 views

Deobfuscation for Cordova apps

Each time I'm uploading a Cordova-based app (game) I can see: There is no deobfuscation file associated with this App Bundle. If you use obfuscated code (R8/proguard), uploading a deobfuscation file ...
Daniel Danielecki's user avatar
0 votes
1 answer
48 views

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 ...
luvzfootball's user avatar
1 vote
1 answer
40 views

Codename one java ios app PROGUARD warnings trouble

I'm writing IOS app using codename one project that I get from codename`s initializer cite. At some point I have to use java.net, java.io and java.util packages. But when I'm trying to build project, ...
Vladyslav Korshenko's user avatar
0 votes
1 answer
25 views

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 ...
Mohammad Elsayed's user avatar
1 vote
0 answers
142 views

Error minifying Android app with R8 after upgrading Android Gradle Plugin to 8.1.0

After updating the Android Gradle Plugin in my Android app project to 8.1.0 I'm encountering an error during the release build when the minifyReleaseWithR8 task is executed. The error message I'm ...
Yury Matatov's user avatar
0 votes
0 answers
10 views

Android ProGuard keepattributes how to filter some specified attributes?

I want to package AAB not include debugging and stack traces informations. In our project‘s third party SDKs there include this rule: “-keepattributes SourceFile,LineNumberTable” and how can i write ...
user2706130's user avatar
0 votes
1 answer
26 views

IronSource proguard obfuscation rules

There is an app with IronSource integration. APK release version build, install and use is absolutely fine. But when I build AAB file, upload it to Google Play console and install it on device, it ...
ilya_kas's user avatar
  • 169
0 votes
2 answers
210 views

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: ...
Csaba Toth's user avatar
  • 10.1k
1 vote
1 answer
67 views

Moshi LinkedHashTreeMap class cast exception with Proguard

When proguard is enabled, after an API call with retrofit, I recieve a list of LinkedHashMapTree that causes this error: java.lang.ClassCastException: com.squareup.moshi.LinkedHashTreeMap cannot be ...
TabascoLosco's user avatar
0 votes
0 answers
14 views

Proguard obfuscation creates fafal exception LinkedHashMap cannot be cast

I use Retrofit to catch a json string that fills a POJO The POJO class is: public class Entries{ public ArrayList<Entry> entries; public Entry entry(int index){ return entries....
Vincent's user avatar
  • 1,651
2 votes
1 answer
149 views

What is the potential issue with ProGuard and ClassValue on Android 14?

In the documentation for behaviour changes when targeting Android 14, there is an issue mentioned related to ProGuard and ClassValue: ProGuard issues: In some cases, the addition of the java.lang....
Adam Burley's user avatar
  • 5,585
1 vote
0 answers
32 views

Is proguard-android.txt obsolete?

Up until not too long ago, I followed the guideline that "In general, it is a good idea to use the proguard-android.txt file as the default proguard file and then add any additional rules that ...
Introspective's user avatar
0 votes
1 answer
37 views

I don't want to obfuscate my files from asset directory, what can be done for this?

App is getting crashed in release mode while reading files from asset directory. In debug mode its working fine. proguard is creating problem. How can I protect those files from obfuscation? I tried ...
Omkar Ingawale's user avatar
0 votes
0 answers
203 views

How to use Proguard in Kotlin Multiplatform (KMM) shared module

This is my :shared->build.gradle.kts file plugins { kotlin("multiplatform") id("com.android.library") id("maven-publish") } group = "com.example"...
Azim Ansari's user avatar
0 votes
0 answers
36 views

Cannot keep class name for Kotlin functions inside AAR

I have an AAR library to use in several Android applications. It was written most in Java but I want to rewrite some utils pseudoclasses in Kotlin to make further development easier. But when I did so ...
artaxerx's user avatar
  • 243
1 vote
0 answers
111 views

Constructor parameter renamed to arg0 with Proguard/R8

I am using reflection to read the name of the constructor's parameters. When I enable proguard (isMinifyEnabled = true) the parameter name becomes arg0, making my reflection fail. I have tried many ...
lotdrops's user avatar
  • 300
1 vote
0 answers
35 views

Keep companion property from the child class but not from the parent

My situation is the following I have class with a public companion object as it follows: open class ParentClass { ... companion object { ... const val CONST_PROPERTY = "value" ...
Ronie M's user avatar
  • 71
0 votes
0 answers
43 views

Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ArrayIndexOutOfBoundsException

my android application works fine on real devices. but when I install it on emulators like genymotion it installs fine. but when I run/tab it, it stops working and in the logcat this log is written ...
hanan's user avatar
  • 542
0 votes
1 answer
119 views

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"...
Antony Nicolas Huaman Alikhan's user avatar
0 votes
1 answer
27 views

Proguard XmlRpc and Javac Parser

I'm getting an error in the release version of my app. java.lang.NoSuchMethodError: No virtual method getXMLReader()Le9/k; in class Ljavax/xml/parsers/SAXParser; or its super classes (declaration of '...
Akbar Sukku's user avatar
0 votes
0 answers
26 views

How to instruct ProGuard to completely remove a particular class from the build?

On an Android App (Hybrid Capacitor/Android App) I have a flag on my BuildConfig called LIVE_RELOAD. When it is set to true, I load a plugin that disables SSL Checking so I can use a self-signed ...
distante's user avatar
  • 6,468
0 votes
1 answer
169 views

AAPT2 aapt2-4.1.0-6503028-osx Daemon #0: Unexpected error during link, attempting to stop daemon

What went wrong: Execution failed for task ':app:processDebugResources'. A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade AAPT2 aapt2-4.1.0-6503028-osx ...
Lalit Patel's user avatar
1 vote
1 answer
324 views

Android obfuscation issue with Retrofit migrating to Android Gradle Plugin (AGP) 8.0 and Java 17

I encounter an obfuscation issue migrating from Android Gradle Plugin (AGP) 7.4.2 to 8.0 and Java 11 to 17: Unable to create @Body converter for class package.api.data.device.DevicesBody (parameter #1)...
romainb78's user avatar
0 votes
1 answer
55 views

Android app logs not logging in release build

I am using android.util.Log for logging in to my Android application. I am storing these logs to a text file for analyzing the production issues. but recently these my application-level logs are ...
Prakash's user avatar
  • 149
0 votes
1 answer
76 views

Getting method not resolved error when using Sendbird SDK with minifyEnabled true when building Android app

I am using Sendbird SDK to implement chat functionality in Android app. In debug mode everything works fine, however once I create a release build with minifyEnabled = true to obfuscate the code using ...
Bruce's user avatar
  • 2,357
1 vote
1 answer
34 views

Exception in build with proguard

I have a fat jar whcih include my package as well as all the dependencies. To obfuscate the jar ,I have addded proguard this is my gradle taks def dependsDir = "${buildDir}/libs/dependencies/&...
Vikas Kumar's user avatar
0 votes
0 answers
25 views

Unable to create instance of class database.networkData.TufeeResponse(Network Response Handler DTO)

What I have changed This app was working fine until I have upgrade agp to 8.0.2 and gradle version to 8.0. || Android Studio Hedgehog 2023.1.1 Canary 8 Full Error Unable to create instance of class ...
Gulab Sagevadiya's user avatar
0 votes
1 answer
83 views

Android IllegalArgumentException: Unable to create call adapter for retrofit2.Call<wh3>

I have encountered the following runtime exception with my android application having upgraded from AGP 7.4.2 to 8.2.0-alpha07 java.lang.IllegalArgumentException: Unable to create call adapter for ...
Hector's user avatar
  • 3,966
5 votes
1 answer
494 views

Error when minifying Android app with R8 after upgrading Android Gradle Plugin to 8.0.2

I recently upgraded the Android Gradle Plugin in my Android app project from version 7.4.2 to 8.0.2. However, I'm now encountering an error during the release build when the minifyReleaseWithR8 task ...
JBokMan95's user avatar
0 votes
1 answer
188 views

kotlin proguard rules for kotlin reflection

Hello everyone I have an issue with kotlin reflection in release mode. I set proguard rules for keeping the data classes, enums, and reflection package but in a release mode , functions that are using ...
MohammadReza Berenji's user avatar
0 votes
1 answer
153 views

How to solve- Duplicate class found in two different external libraries

In my project there are two different external libraries // TheoPlayer Android SDK implementation ':theoplayerApi21@aar' // Pushly notification SDK implementation 'com.pushly.android:pushsdk:1.1.9' ...
Makarand's user avatar
  • 983
0 votes
0 answers
86 views

Android Proguard obscation issue for Azure Blob Storage Library

I am implementing the Azure Storage blob library for uploading files to the server. It is working well for debug build but giving issues for the signed build. If I make minifyEnabled false in the main ...
SaurabhG's user avatar
  • 173
3 votes
1 answer
199 views

Unable to correctly use proguard/r8 rules on Flutter 3.7.11

I cannot effectively exclude classes from code obfuscation in the final apk using flutter for android. I am developing a plugin that wraps some native android code / libraries and provides some ...
gabriele finello's user avatar
0 votes
0 answers
34 views

Using Proguard with Kotlin server

I can't configure Proguard for pure Kotlin app (no Android). Used code from their site: tasks.register<ProGuardTask>("proguard") { configuration("proguard-rules.pro") ...
Psijic's user avatar
  • 743
0 votes
0 answers
583 views

Android R8 release build CIRCULAR REFERENCE with AGP 8.0.2

I can't build release apk file. Debug apk - created OK. It produces such an error, what I can add to proguard rules to fix this? Thanks. On Android Gradle Plugin 7.4.2 - release is building OK, but on ...
yozhik's user avatar
  • 4,664
0 votes
0 answers
22 views

using proguard-retrace 7.0.0 not able to deobfuscate the line numbers

i am using proguard-retrace 7.0.0 version in my java project but i am not able to obfuscate the line numbers class and method name are working fine, Also is there any way to deobfuscate the lambda ...
NEHA NIGAM's user avatar

1
2 3 4 5
88