4,441
questions
0
votes
0
answers
34
views
Prevent resource drawable name obfuscation in release build apk
Since I've upgraded to
gradle-8.2
android.tools.build:gradle:8.2.1
kotlin_version = "1.8.0"
But release apk has resources renamed which is undesired for some post processing of the apk
The ...
0
votes
2
answers
42
views
How to force android studio to use proguard instead of r8?
I'm trying to use zelix klassmaster for my Android project, and it has a feature to translate proguard into their own obfuscation technique. I know that android studio uses r8 by default, i wanted to ...
2
votes
0
answers
29
views
How to prevent proguard from overloading functions that have different return types
I'm working on a Javacard applet. I'm using Proguard because I have almost no memory on that card. I also optimize aggressively because of this. Proguard will overload functions, which is fine, but if ...
0
votes
0
answers
19
views
Unable to remove Log using assumeNoSideEffect with Dexguard [duplicate]
I'm trying to remove Android's Log methods using Dexguard, but I'm not able to do this.
This is what I'm doing:
build.gradle(:app)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'...
0
votes
0
answers
21
views
RevenueCat Paywall Component Causing Crash on Android Device - NoSuchMethodError in AnimatedContent Method [duplicate]
I'm encountering a crash on Android when trying to display the RevenueCat paywall component in my React Native app. The same component works fine on iOS, but on Android, the app crashes with the ...
1
vote
0
answers
100
views
A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
I was migrating Kotlin 1.6 to 1.9 and also need to changes AGP version from 7 to 8. But I am facing an issue related to proguard, where I am getting
A failure occurred while executing com.android....
0
votes
0
answers
25
views
App Crashes on Login with Firebase Auth and ProGuard Enabled in React Native
I am working on a project using React Native with the following libraries:
@react-native-firebase/app": "^19.0.0
@react-native-firebase/auth": "^19.0.0
I have configured ProGuard ...
1
vote
1
answer
50
views
How to disable Proguard
i want to disable proguard completly but i cant find a way to disable it
setting minify enable to false has no effect
buildTypes {
getByName("release") {
isMinifyEnabled ...
0
votes
0
answers
37
views
Error Didn't find class on path: DexPathList with R8 & Proguard Rules
I have a problem launching our application. Since I launched the first version of the application there was no problem, I was going to launch the second version and I got an unexpected fatal error, ...
0
votes
0
answers
17
views
proguard doesn't correctly unbox the clone method of enum
I have a Kotlin enum class. When I compile the release package, Redex warns me about a type mismatch issue. Its definition is as follows:
open class Config private constructor(val adapterType: ...
0
votes
1
answer
39
views
Prevent proguard/r8 from removing Kotlin synthetic default constructor
I'm using moshi which accesses the Kotlin default constructor of a class by reflection.
The class looks like this:
@JsonClass(generateAdapter = true)
data class AClassName(
val threadId: String,
...
0
votes
0
answers
13
views
How do I prevent font class names being obfuscated?
I have an application that includes a number of ttf fonts and I get the font names using the following code:
val fontClass = R.font::class.java
val fields = fontClass....
0
votes
1
answer
18
views
While invoking third party AAR sdk in Signed Build
org.simpleframework.xml.core.InstantiationException: Cannot instantiate class com.ecs.abc.ESignProcessor for class com.ecs.abc.ESignProcessor
Getting above error while invoking third party sdk in a ...
0
votes
2
answers
149
views
Proguard rules to avoid Shared Preferences Not Found in flutter
I use the awesome_notifications plugin in my Flutter app. In debug mode everything runs fine, but in production the app crashes at launch.
So I did bunch of testing and finally found out that in ...
0
votes
0
answers
23
views
Proguard rules not working after add minifyEnabled true
I am trying to run my flutter app ( I am using the lates flutter version 3.22). I am getting errors on Missing classes while trying to run release mode. I navigated to the /build/app/outputs/mapping/...
0
votes
2
answers
61
views
Curl command execution in Gradle.kts Script
I would like to execute below curl command in my gradle.kts Script. Tried gradle task but command not executable with error [pid=1991, exitValue="Not exited"].
curl -v -H Content-Type:text/...
2
votes
1
answer
103
views
Issue when creating distributable for compose desktop with ProGuard enabled
I am working on a personal Compose Desktop project, and I want to enable ProGuard's code obfuscation feature. I found a tutorial on JetBrains' GitHub page, and I altered build.gradle.kts file to ...
0
votes
1
answer
83
views
flutter build apk file error while using messbio flutter sdk
I'm working on a Flutter project that uses the Mesibo SDK for chat functionality. When trying to build the APK, I encounter the following error:
ERROR: Missing classes detected while running R8. ...
0
votes
0
answers
12
views
proguard: how to keep all implementation class names except one
proguard: how to keep all implementation class names except one? e.g.
public interface Foo {
...
}
public class MyFoo implements Foo {
...
}
public class MyFooA extends MyFoo {
...
}
...
0
votes
1
answer
68
views
Android app crashing in release mode when minifyEnabled = true
I am using minifyEnabled = true and the project works fine in debug mode. But when I generated the release build it crashed on startup. I think it is due to Hilt. Can someone tell me the rules to add ...
3
votes
0
answers
67
views
Do I need to add Proguard rules when developing Android libraries?
Currently, I'm working on an Android library that relies on other libraries like Gson and Glide. Our senior developer mentioned that when using Proguard, we should include Proguard rules for these ...
5
votes
0
answers
627
views
Play Console Pre-launch report crash of com.google.android.gms
Since from the last update we starting having crashes related to the gms (google play services) library in the release build play console pre-launch automated tests.
We are not able to reproduce it in ...
0
votes
0
answers
21
views
Avoid Kotlin Annotation Class from Obfuscating in Proguard Rules
I have a Kotlin annotation class as below -
import androidx.annotation.StringDef
const val GRANT_TYPE_REFRESH_TOKEN = "refresh_token"
const val GRANT_TYPE_ACCESS_TOKEN = "access_token&...
5
votes
1
answer
149
views
How to predict Android release build runtime crash due to Proguard obfuscation
While I am aware of how to troubleshoot Proguard related issues, verifying that no crash will occur when the app is launched is time consuming:
Modify module's proguard.cfg
Build > Clean Project
...
1
vote
0
answers
34
views
Is there any way to keep stacktrace readable and avoid obfuscating that?
Im sending crash's stacktrace to my server, when i use r8 and obfuscate, the stacktrace goes illegible an unreadable like this:
java.lang.Exception: button crash
at fa.p.d(:63)
at ra.h.d(:49)
at o.w.k(...
4
votes
2
answers
165
views
LinkageError: Method onCreate overrides final method
Generate Signed App APK used to work flawlessly for an app of mine until... I upgraded Android Studio to 2024.1.1.
It still builds and runs perfectly when generating debug APK. However, when I attempt ...
0
votes
0
answers
24
views
How to strip debugging content from kotlin code using proguard?
I developed an android app using kotlin, and when I decompiled my code, in the smali file, I saw a lot of this.
/a/l.smali:61: const-string v5, "null cannot be cast to non-null type java.lang....
1
vote
0
answers
41
views
Packaging war using proguard with spring-boot-maven-plugin, there is no obfuscated classes in output war
I tried to obfuscate my spring boot project with proguard and proguard-maven-plugin, spring-boot-maven-plugin. After several attempts, it packaged without errors, but the obfuscated output doesn't ...
-1
votes
1
answer
37
views
Proguard and GSON combination causing issues
I have been using GSON with proguard enabled in my app. I am saving an object in shared prefs using GSON like this
DriverBalanceStat class
public class DriverBalanceStat {
public Double Balance;
...
0
votes
0
answers
58
views
R8 full mode in AGP8 breaks flutter_local_notifications
After upgrading AGP to version 8.4, zonedSchedule notifications causes app to crash
Use this minimally altered example project: NotificationsSample
Run Pixel 7 API 33 emulator from Android Studio ...
0
votes
0
answers
21
views
The TypeScript code (function, export, classes, etc.) does not appear in the R8 (Old name ProGuard) logs when applying rules
I have built an app that has a structure but that said structure does not appear in the logs of R8. When I build the app for release (apk) I would like to see if it is applied to the source code of ...
0
votes
0
answers
39
views
Proguard crashes Firebase ML Kit SDK
I am facing crash using a third party library. The library uses Firebase ML Kit internally . I keep below classes in dexguard but still facing crash.
-keep public class com.google.android.gms.**{*;}
-...
0
votes
2
answers
54
views
APK Size Doubled Despite No Changes to lib and assets Folders
I recently received a release for my Android app that was 90 MB. However, the latest release has doubled in size, despite no changes to the lib and assets files. but the raw size of same files are ...
1
vote
0
answers
41
views
Proguard Keep Interface Variable Names for Mybatis
Proguard cannot keep method variable names in interfaces no matter what kind of -keep options I give it. I tried:
-keep interface com.xxx.data.mapper.* {*;} and -keepparameternames
I also tried to add ...
3
votes
0
answers
259
views
R8: Hilt injection using @Qualifiers fails with DuplicateBinding after upgrade to AGP 8.4
After upgrading to AGP 8.4 I've faced a lot of build issues for the release build, mainly to do with R8 library keep rules.
But now I've stumbled upon another issue:
MyApplication_HiltComponents.java:...
0
votes
0
answers
29
views
Proguard not removing Logs from AAR dependency
My andorid app depends on an aar file. The aar comes with its own proguard file inside. So I unzipped the aar and added the following in the proguard file:
-assumenosideeffects class android.util.Log {...
-1
votes
1
answer
127
views
How to obfuscate Android AOSP system app code?
Does anyone know if it's possible to obfuscate Android AOSP or LineageOS Android 13 system app java code or resources for apps like SystemUI, Settings, TvSettings, framework-res.apk if building from ...
0
votes
1
answer
218
views
Android Proguard obfuscation configuration problem
I am having issues with creating a obfuscated/shrinked/optimized apk for my Android(Java) app. As I am new to proguard ,I am trying first to get the apk done with the basic config, I have not added ...
1
vote
2
answers
99
views
Will proguard obfuscation affect my json data?
I have a class that is serialized to get:
class test{
string test1;
string test2;
string test3;
string test4;
}
out:
{
"a": "...",
"b": "...&...
2
votes
1
answer
47
views
Proguard configuration to keep members with an annotation that has parameters
We are obfuscating our project with Proguard and are using picocli for some command line tools. We have Java code something like the following
@picocli.CommandLine.Option(names = { "--argument&...
0
votes
0
answers
26
views
The library resulting from obfuscation cannot be read in the Gradle project
I'm trying to make a program using Netbeans 21 + Jdk 17 with Project Gradle
This program has a dependency on another project. This project has been obfuscated using Proguard 7.4.2
the obfuscation ...
0
votes
1
answer
107
views
Unreadable exception stack trace in Jetpack Compose
i am facing some weird exception stack traces when i enable minification. The weird thing is that it happens only inside setContent.
release {
isDebuggable = false
isMinifyEnabled = true
...
0
votes
0
answers
13
views
How to obfuscate only annotated class of a package with proguard?
I would like to annotate just some classes where I apply a custom Annotation, how can I tell proguard to skip all class without that annotation?
I tried this
-keep [email protected] class *
But it doesn'...
0
votes
0
answers
93
views
Cannot access 'androidx.appcompat.app.AppCompatActivity' when I enable ProGuard in kotlin
I have a code like this in my application project
I try to connect this library to my application project below
myActivity.start(
...
)
but I get this error ->
...
0
votes
0
answers
69
views
ProGuard Rules Not Recognizing Methods Inside Companion Object
I cannot access the companion object methods in my activity B and class A even though I added the proguard rule for activity or activity companion object's methods ?
hear is my code:
class A private ...
0
votes
0
answers
28
views
JSON parsing isn't working after enabling Proguard
JSON parsing isn't working after enabling Proguard . I have activity like this
package com.alamart;
import android.content.Context;
import android.os.Bundle;
import android.widget.TextView;
import ...
0
votes
0
answers
63
views
React Native (Android) app gets stuck on white screen on release build with minifyEnabled true
I'm an Android developer who's currently working on a React Native project. I've been encountering an issue where my app gets stuck on a white screen specifically when building the release version ...
0
votes
0
answers
19
views
IvParameterSpec(byte[]) is being defined based on hardcoded values dexguard issue
We are trying to integrate dexguard on our application. while we generate the protected .apk file and uploaded to app sweep we got an issue
IvParameterSpec(byte[]) is being defined based on hardcoded ...
1
vote
0
answers
210
views
Encountering java.lang.ClassCastException with Hilt Dependency Injection in Android while applying proguard rules
I have created an Android library. When I use it as an AAR file without enabling ProGuard, it works fine. However, when I enable ProGuard rules, it stops working.
I am using it as below in my app ...
1
vote
1
answer
35
views
The application could not be installed: INSTALL_PARSE_FAILED_NO_CERTIFICATES Error in kotlin?
I have an SDK project and I want to test whether Proguard corrupts some files when isMinifyEnabled true if so I try to configure proguard for release version, but I encounter the following error. I am ...