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
0 votes
0 answers
13 views

Unable to deobfuscate stacktrace with proguard mapping file

I am using the proguard GUI to deobfuscate a stack trace on Mac. On a local test build, I can successfully deobfuscate a test crash. But on my prod version, built on pipeline, the generated mapping ...
Rowan Gontier's user avatar
0 votes
0 answers
26 views

Android - R8 causes subclass of LinearLayoutManager to crash

This may be more of a bug report than a question. I'm pretty sure I've found an issue with R8. See my experiments and bug report here. Am I doing something wrong? https://issuetracker.google.com/...
Christopher Hull's user avatar
0 votes
1 answer
17 views

Missing class com.google.devtools.build.android.desugar.runtime.ThrowableExtension

Recently I have upgraded my gradle version from 7.2 to 8.1. After the upgradation, I am facing Missing class com.google.devtools.build.android.desugar.runtime.ThrowableExtension (referenced from: ...
Shakib Uz-Zaman's user avatar
0 votes
1 answer
31 views

How to run Proguard/R8 on a library before running it on an app, as if it was an external dependency?

I'm afraid I'm either misunderstanding the behavior of Proguard/R8 or it's not suited for my needs. I'd appreciate some clarification if there's any Proguard expert out there. Here's my context. I'm ...
Paul-Etienne's user avatar
0 votes
0 answers
30 views

Android Studio, okhttp: Building a Release version of app causes NullPointerException: getConnectionId(...)

Building a release version of app and running it, causes following error: When building a debug version, the app works as expected. FATAL EXCEPTION: e9.s Dispatcher Process: com.example.premi, PID: ...
matthew123's user avatar
2 votes
1 answer
48 views

How to apply Android R8 obfuscation to native code?

I'm developing an Android app that has to be obfuscated for security reasons. Some classes and fields that are obfuscated by R8 are used in my C++ code, so of course the obfuscation step breaks this ...
Paul-Etienne's user avatar
0 votes
0 answers
14 views

Android proguard issue

i am asked to do this im my app Please consider implementing robust code obfuscation techniques to obfuscate sensitive parts of the code, such as: • Method names, class names. • Strings encryption....
Ahmed Hesham's user avatar
0 votes
1 answer
17 views

proguard syntax meaning of * and **

I found below two cases: -keep class com.android.ons.** {*;} -keep class com.android.ons.* {*;} One is using ** but another one is using *. what's the difference?
lucky1928's user avatar
  • 8,842
0 votes
0 answers
65 views

R8 vs ProGuard - keep rules

My understanding is that R8 (Google) and ProGuard (Guardsquare) are different products that can't work together. Now, in the latest gradle versions, Android Studio enables R8 by default and the ...
Andreas's user avatar
  • 123
0 votes
0 answers
16 views

Why do the old and new APK diffs not add up?

I'm trying to reduce the size of an APK and I made the R8 minimization more aggressive by Using the proguard-android-optimize.txt file instead of the regular Removing the contents of local proguard-...
robl's user avatar
  • 124
0 votes
0 answers
20 views

Problem with proguard...(no Creators, like default constructor, exist): cannot deserialize from Object

The debug of my app everything works but when I run the release, I have a problem In the logcat I have the message: Cannot construct instance of com.my.myapp.MiClaseDatosPrincipalesTiempoGeocodingAPI$...
MrDario's user avatar
2 votes
0 answers
23 views

How does package-info.java affect proguard (and why)?

If I have a class in an Android project that is in a package without a package-info.java file, the class can end up obfuscated as just a with members being a, b, c, ..., but adding a package-info.java ...
Bill Mote's user avatar
  • 12.7k
-2 votes
0 answers
37 views

Maven-assembly-plugin includes incorrect JAR files

I try to generate fat jar of my multi-module project. Before generating fat jar I perform obfuscation with proguard-maven plugin. Main release module has given profile definitions: <profile> ...
Patryk Łęczycki's user avatar
1 vote
0 answers
47 views

Moshi Json - Decompiled code still shows annotated name

I am trying to enable code obfuscation in my android project. I am using moshi for json operations. I am having a problem with release apk file. When I use a decompiler the @JsonClass(generateAdapter =...
KAPLANDROID's user avatar
  • 1,109
0 votes
0 answers
59 views

App crashes after versions upgrade in Android Studio

App crashes after upgrading Gradle, Android Gradle Plugin, JDK versions, compileOptions versions. Changes are, Gradle: 7.5 -> 8.1 AGP: 7.4.1 -> 8.1.2 JDK: 13 -> jbr17 compileOptions: 1....
foseja's user avatar
  • 268
0 votes
2 answers
76 views

would it be okay to place @keep annotation on domain model in android?

I have encountered a problem where my app built for release throws an error with following error logs. java.lang.ClassCastException: com.squareup.moshi.LinkedHashTreeMap cannot be cast to com....
foseja's user avatar
  • 268
0 votes
0 answers
25 views

Proguard outjar throwing new errors

I'm trying to obfuscate a jar file with proguard through its gui. My project uses gradle, but I couldn't make it work, I didn't find tutorials and I don't understand much about gradle, so the ...
Salu Ramos's user avatar
0 votes
0 answers
134 views

Flutter build Proguard configuration rule does not match anything

I am running a Flutter release build and am getting warnings Proguard configuration rule does not match anything. See below for a full list. Should this be raised to Flutter GitHub issues or am I ...
under's user avatar
  • 2,641
0 votes
0 answers
98 views

Type kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsResourceLoader is defined multiple times

I wanted to enable ProGuard, so I made the minifyEnabled variable true in my build.gradle file. However, I could not get APK buil in any way, I got the following error every time: Type kotlin.reflect....
Ozgur Baykal's user avatar
0 votes
0 answers
113 views

.NET MAUI android app is crashing in release mode

I have tested my android app in debug mode on android devices it's working fine but it is crashing in release mode. It is giving me the following error in the Device Log: java.lang.NoSuchFieldError: ...
Judson Abraham's user avatar
0 votes
0 answers
49 views

How do I verify that my proguard rules have been applied to my expo project?

I have a simple React native app which I want to submit to Google Play Store via EAS Build. Eas build created .apk file from my react native project. Before that, I want to apply some Proguard rules ...
newbie coder's user avatar
0 votes
1 answer
66 views

As a library developer: how to avoid the user's Proguard

I'm a library developer. I'm experiencing issues with the users of my library regarding Proguard. Seems like their Proguard is messing the models of the library. I have defined in the proguard-rules....
MACROSystems's user avatar
1 vote
0 answers
22 views

Why is tools:keep ignored when building App Bundles?

In my Android drawable folder I have certain images that are never directly referenced from the code so Proguard flags them as unused and they are not included in the release build. To include said ...
Al0x's user avatar
  • 927
0 votes
0 answers
15 views

Java obfuscated file with proguard runs on default folder but does not run on any folder

I'm stuck trying to obfuscate a java program with proguard 7.3.2 on windows 10 and jdk 9. Some facts: original jar runs well on the default folder (/dist) original jar DOES NOT run on any other ...
Dulcinea's user avatar
3 votes
0 answers
79 views

How to shrink proguard deobfuscation file

i started to get an error in google play console and i am unable to upload an AAB after upgrading to AS Giraffe patch 2. i dont know if that is the issue but i have no idea how to change the size of ...
BigApeWhat's user avatar
0 votes
2 answers
55 views

android R8 how to keep class name but not members

Now I have an annotation named "ABC", I want to keep the classes which has a member annotated by "ABC" like class Test { @ABC var testField: Int = 0 var testField2: Int = ...
Jade's user avatar
  • 424
0 votes
1 answer
81 views

How does ProGuard obfuscate class variables and logic?

I've tried to obfuscate a class file from a Java app and also a standalone Java class file containing static void main(java.lang.String[]). Anything I try on either file has resulted in the class and ...
Tom Griffith's user avatar
0 votes
1 answer
129 views

Android Studio Minify with R8 run indefinitely "minifyReleaseWithR8"

The last version of my app was built with Gradle 7.2.0 and the minification was running fine. Forward a few months, I am trying to build the same application with the same libraries with the same ...
Maxime Beaupré's user avatar
0 votes
1 answer
22 views

Android proguard rule for databinding

I have used onclick databinding in my layout files <data> <variable name="clickHandler" type="com.example.ui.ClickHandler" /> </...
Aagam Shah's user avatar
0 votes
1 answer
57 views

proguard.ParseException: Expecting separator ';' before 'sProcessGlobalConfig'

I'm using Cordova-android 12.0.1 and trying to obfuscate it with ProGuard 7.3.2 with instead of R8. However, whenever I try to build, it returns this error: Execution failed for task ':app:...
Yeetjia's user avatar
0 votes
1 answer
26 views

FirebaseUI Sign-In Not Working with Proguard After Gradle and Java version Updates

I'm encountering an issue while using sign-in functionality in my Android app with FirebaseUI .Initially, it was working correctly with Proguard enabled. However, after making some version changes in ...
Android Developer's user avatar
1 vote
0 answers
42 views

log4j2 custom appender is not working after proguard

I am getting below error after applying proguard. The -injar that is using for proguard is not getting the error. Checked the error by skipping all the classes including dependencies from obfuscating ...
Ara's user avatar
  • 83
0 votes
1 answer
135 views

How to prevent R8 from removing public Compose Preview methods in release builds?

I'm using airbnb/Showkase library for collecting all previews into a catalog and was exploring the idea of putting an entry point to that catalog browser activity somewhere in admin settings page in ...
Marat's user avatar
  • 6,314
1 vote
1 answer
29 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
  • 83
1 vote
1 answer
869 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,683
0 votes
0 answers
19 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
3 votes
0 answers
413 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
213 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,474
1 vote
0 answers
34 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
  • 814
0 votes
1 answer
142 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,907
0 votes
0 answers
27 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
  • 21
0 votes
1 answer
136 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
76 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
169 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,900
0 votes
1 answer
127 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
34 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
71 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
105 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
48 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
40 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
2 3 4 5
88