Questions tagged [proguard]
ProGuard is a tool to shrink, optimize, obfuscate, and preverify Java classes. It is included in the Android SDK.
5,287
questions
0
votes
1
answer
8
views
okhttp3 minifyEnabled causes crash on Android 4.1.2
This code in okhttp:3.12.13 works fine with minifyEnabled false
private static boolean supportsAlpn() {
if (Security.getProvider("GMSCore_OpenSSL") != null) {
return true;
} ...
0
votes
0
answers
31
views
Crashlytics mapping file upload fails on Android Studio with minifyEnabled
When activating proguard (minifyEnabled = true) in my gradle configuration, the build fails in the step:
:app:uploadCrashlyticsMappingFileRelease
the returned error is: java.io.IOException: ...
0
votes
0
answers
11
views
Proguard rule for Huawei push client
I have Unable to create application im.app.android.core.AppDemoApplication: e3.b: com.pushserver.android.huaweiPushClient cant cast com.myApp.android.push_lib.huawei.HcmPushClient to PushClient error
...
0
votes
0
answers
7
views
how to keep the class names and class members names in pro-guard GUI?
i am beginner in code obfuscation using pro-guard Gui i have to obfuscate a jar file and have to keep class name and class method name please guide.. i already try a lot to resolve it by using keep ...
2
votes
1
answer
85
views
react-native-config not working in release builds
I was using react-native-config to support multiple flavours for multiple release builds. I've created multiple .env files also and all the debug builds are able to access it and getting the configs. ...
0
votes
1
answer
130
views
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 ...
0
votes
0
answers
12
views
Proguard removing Set decleration which then causes Collection has neither generic type or OneToMany.targetEntity() defined [duplicate]
Prior to Proguard my code looks like this:
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "scenarioProjectCompoundId.project")
private Set<ScenarioProject> ...
0
votes
0
answers
15
views
Android app crashes on AsyncHttpClient when obfuscated, after Oauth2 was introduced
After we introduced the Oauth2 lib in our project, it started crashing whenever an obfuscated APK is being tested.
The app is made of a few modules.
One module (the app module) uses:
...
0
votes
0
answers
19
views
Maven build include obfuscated jar as dependency
I have a maven project that should be obfuscated by proguard plugin.
This works fine when my dependency jar is not obfuscated.
But the result is that the dependency jar (also owned by me) is included ...
0
votes
0
answers
36
views
Getting line line numbers for AppCenter Diagnostics in Xamarin.Android apps
I am currently working in Xamarin.Android application, which is integrated with AppCenter for capturing Crashes & Exceptions. When using emulator in debug config or release config (with following ...
0
votes
1
answer
41
views
Could not compute caller for function: public constructor Error when enable proguard in Android
The project working well without enabling proguard, the problem comes when enable it, I am using retrofit with Moshi converter and Coroutines to fetch list of data, and Hilt for DI, and I added all ...
2
votes
2
answers
127
views
Baseline Profiles x R8/Proguard
I've been experimenting with Android's Baseline Profile & MacroBenchmark libraries for improving the app performance.
The question I have is that it is suggested that the MacroBenchmark's build-...
1
vote
0
answers
14
views
Proguard doesn't keep access modifier in parameterized constructor
I have following class A
Class A {
public A(String param1, String param2)
// body
}
public A(String param1, String param2, String param3)
// body
}
}
My proguard settings
keep 'public ...
0
votes
0
answers
26
views
Obfuscation not working without error info
1.proguard-rules.pro has not any keep command.
2.minifyEnabled and shrinkResources are true in debug or release channel.
3.There are no error info when building project.
4.R8(3.x.x) and Gradle tools(7....
2
votes
0
answers
41
views
HealthConnect - Permission Dialog not working in release mode
App crashes when the app is running in release mode with proguard enabled.
Here is the Crash report.
Fatal Exception: java.lang.IllegalArgumentException: Unknown data type name h0
at android.os....
0
votes
0
answers
14
views
Is it possible to protect a Gradle Plugin with ProGuard?
I've been working on a Gradle pluging and started wondering if it would be possible to scramble the contents of the resulting .jar using ProGuard.
Once Proguard had been used on the plugin would the ...
0
votes
1
answer
17
views
File names are coming as obfuscated names in the Crashlytics logs
I have added the below lines, still the crashlytics logs are coming as obfuscated names. Unable to see the file names, it comes like "Unable to instantiate fragment h.d.p.q.s.b: could not find ...
1
vote
0
answers
33
views
android apk files with strange folder structure, all files directly inside /res folder
normally when you open an APK file as zip, inside res folder there are multiple sub-folders named, layouts, drawable-xx,values-xx, raw, xml, ...
but I've seen a few APK files that have all the files ...
0
votes
1
answer
48
views
: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....
1
vote
2
answers
97
views
Android project not obfuscating
I want to obfuscate my android code, I have set minifienable true and setup proguard file, but after generating apk and decompile, the code is not obfuscated. This is my proguard :
my proguard file:
-...
-1
votes
1
answer
49
views
Is proguard capable to obfuscate logger messages?
I used proguard to obfuscate a jar and after research the resulting jar it was found that it didn't obfuscate logger messages which I probably would like to do.
How to do it with proguard? I used gui ...
1
vote
1
answer
108
views
Android Gradle Plugin 7.2 ignores added proguard file in Android App build process
I have a Gradle plugin I wrote for an Android app project. Amongst other things - this plugin adds a custom ProGuard rules file to all ApplicationVariants being built.
the has worked fine until ...
0
votes
0
answers
26
views
how to prevent proguard obfuscation from changing the code?
I have a problem with proguard obfuscation it changes some parts of the code and causes errors
for example I have the following code:
for (int i=0;i <rowsNb; i++){
try {
Integer....
-1
votes
1
answer
27
views
How to Add Proguard in Library Module in Android
I want to add proguard rule in library module.
0
votes
1
answer
31
views
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 ...
0
votes
0
answers
41
views
proguard wont let me to do readText by ktor to convert it to data class by Google Json
as you can see the sample:
val response = service.sendPhoneNumber(phoneNumber = phoneNumber)
val user = Gson().fromJson(response.readText(), User::class.java)
after active proguard, I won't be able ...
0
votes
2
answers
50
views
Conflict on class names after code obfuscation on two different SDK
When minified is enabled, there is a conflict between the obfuscated names of two different SDKs.
Duplicate class a.a, etc
I am trying to figure out if there is any way to solve this?
> A failure ...
0
votes
1
answer
19
views
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....
0
votes
1
answer
25
views
after enabling proguard,crash line number is incorrect
after enabling proguard,crash line number doesn show correctly
my hap has been published to google play and a user crash inside app,in my crash reporter,the crash line number is unknown and incorrect
...
0
votes
0
answers
21
views
TelephonyCallback.CallStateListener issue with Pro-guard
I am seeing a strange pro-guard/R8 issue. One of the third-party APKs I use is implementing TelephonyCallback.CallStateListener(added in api 31). The strange thing is when I keep my target SDK of my ...
0
votes
1
answer
44
views
How to ignore specific package in proguard
I am trying to build (release) an app and the app crashes due to the fact that there are generated methods that are being obfuscated by ProGuard. How can I ignore all of them in the release build?
I ...
0
votes
0
answers
55
views
Proguard rule not working for Interface inside the class - Android
Error:
> Task :app:compileDebugKotlin FAILED
e: org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression at (111,13) in C:/[Workplace+package]/MainActivity.kt
---
---...
0
votes
0
answers
33
views
how to apply proguard at particular part of code or class or Activity in android
we are enabling proguard in android project for all packages regularly. so,
we are using keep functionality and exclude some particular classes or packages or Library aar's from obfuscate(proguard) in ...
1
vote
1
answer
86
views
How to shrink resources and remove unused language resources with Android.mk
I am working on AOSP Settings application which builds properly.
I am trying to build "user build" and have enabled proguard using proguard.flags and disabled jack compilation
...
6
votes
1
answer
77
views
Android release crash with exception net.sqlcipher.database.SQLiteException
I've uploaded my app to play store but it still crashes as "crash report image" of developer console shows.
on some devices the app did not lunch at all
while on other it crashes when start ...
0
votes
1
answer
58
views
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 ...
1
vote
1
answer
45
views
Xamarin Forms Android - How to Enable Proguard Shrinker in Visual Studio for Mac 2019
I am trying to invoke Proguard Code Shrinker for my XF 5.x Android Application in Visual studio for Mac 2019.
It looks like I need the Windows version from the Documentation. Is that true?
https://...
0
votes
1
answer
23
views
code and classes are not secure using proguard
I want to secure my code from reverse engineering And I have already used Proguard and defined rules too, But after reverse engineering I am getting all my classes with same name and also code in it. ...
0
votes
1
answer
73
views
How to create an android library/module with Proguard applied
Scenario:
I need to create an android Library/Module for a client and I want to Obfuscate the library with Proguard so that the client could not extract or see the source code from Library. How would ...
1
vote
1
answer
40
views
disable log in release mode android
I want to disable logcat on release mode and i put below code on build.gradle :
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-...
0
votes
0
answers
20
views
Google Services not working on enabling proguard rules
I am working on proguard rules. On enabling proguard rules Google Services like Google SignIn, Google Maps and Google Places not working. I have also added below proguard rules in my project still not ...
0
votes
1
answer
194
views
Flutter: Using Proguard with Gradle 7.0.4 [duplicate]
I just updated to Gradle 7.0.4 and upon build I now get the error.
A problem occurred evaluating project ':app'.
No signature of method: build_9gq7rvxos4tcg7upa17qqy1oj.android() is applicable for ...
1
vote
0
answers
44
views
Proguard covert constant string value somehow
I'm getting issue when using proguard. For some reasons it's changing only one string value in firebase-installation library, file is com.google.firebase.installations.remote....
0
votes
0
answers
30
views
Partial obfuscation
Has anyone encountered the problem of partial obfuscation? The class is partially obfuscated. Some methods change name, some don't
here is my proGuard file
#nav models
-keep class * extends ...
0
votes
0
answers
40
views
Make ProGuard keep classes that extend a certain class
I have many classes that either extend ConstraintLayout or extend other classes that extend ConstraintLayout.
Some of them I access them by reflection, thus ProGuard consider them unused and remove ...
1
vote
0
answers
192
views
Obfuscation for Compose Desktop application. Probably with ProGuard
Our main task is to make a GUI application on Windows (and preferably on Mac too) so it would be impossible/extremely difficult to find out the source code (Kotlin). Question is = how to do it?
...
0
votes
1
answer
46
views
Relase aar doesn't contain any code android?
I am using android studio bumble bee
I created a module library which has a single class
class Lib2 {
fun print(){
println("From lib2")
}
}
The proguard as
-keepclasseswithmembers ...
0
votes
0
answers
262
views
Wrong implicit dependency with ProGuard and distribution task
In my Gradle 7.3.3 build I am using ProGuard to obfuscate my library which I am then using as the content of my distribution as follows:
buildscript {
repositories {
mavenCentral()
}
...
0
votes
0
answers
37
views
The rule matches no class members for enum in proguard
I have enum decalare as
enum class PARTY {
START, STOP
}
And in proguard I have added
-keep public enum com.interface.PartyChart$PARTY{
<fields>;
public static **[] values();
public static *...
0
votes
1
answer
108
views
How to override other proguard rules
I wish to remove a class A with the following signature
package com.example
class A : Base {}
from a thirdpartylib.aar that comes with its own set of proguard/r8 rules one of which is
-keep public ...