proguard

Proguard is ruining my cleanliness. Gson and generics

匿名 (未验证) 提交于 2019-12-03 08:54:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a function that loads information from persistence, and I just tell the type it is in a really simple way. The class is called SharedPreferencesHelper.kt so it is a really life problem solver: fun <T> loadList(context: Context, fileName: String, key: String, defValue: ArrayList<T>) : ArrayList<T> { val gson = MyGsonDependency.getInstance() val json = getWithFileName(context, fileName).getString(key, gson.toJson(defValue)) return gson.fromJson(json, object : TypeToken<ArrayList<T>>() {}.type) } to load, for example, an ArrayList<String

How Proguard works in Intellij Idea?

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using IntelliJ IDea 11.1.3 for Android development and I must admit it is a wonderful tool. I have few doubts about how to use Proguard with the IDE. I have found the option of Run Progaurd under Open Module Settings -> Facets as in the image below Run Proguard need a location of Config File which is defaulted to proguard-project.txt. Next is a check box which says Include system proguard file . What System Proguard File is referred to in this checkbox option? Given all the configuration of Proguard is in proguard-android.txt in Android

Generate Signed APK: Errors while building APK Android Studio

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am unable to generate Signed APK using minifyEnabled true and shrinkResources true App Level : build.gradle buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:2.1.0' } } apply plugin: 'com.android.application' repositories { mavenCentral() } android { compileSdkVersion 23 buildToolsVersion '22.0.1' defaultConfig { applicationId "......." minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" }

Proguard retrace isnt mapping the stack trace to the actual source

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have been using the eclipse built in proguard tool to obsucate the code, which Works fine. However when I try to retrace the stack trace of the obfuscated code, retrace doesn't output an un-obfuscated stacktrace. I have double check the mapping.txt to sure that i am using the right one. here is my stack trace ERROR/AndroidRuntime(19398): FATAL EXCEPTION: Thread-35 ERROR/AndroidRuntime(19398): java.lang.NullPointerException ERROR/AndroidRuntime(19398): at android.graphics.Canvas.throwIfRecycled(Canvas.java:954) ERROR/AndroidRuntime(19398):

With ProGuard, how do I obfuscate just one class?

我的梦境 提交于 2019-12-03 08:40:08
问题 What would be a smart ProGuard configuration to obfuscate just the private methods and constants of one particular class com.acme.Algorithm? I would like to obfuscate just that, because it contains an algorithm that should not be plain obvious when accidentally opening the .jar. I'm a ProGuard newbie. AFAIU, you have to use "keep", but the positive logic of "do obfuscate" is not available, right? So how to exlude my class from a "keep everything" config? Note: I don't want to obfuscate other

Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug' if I enable the proguard

拥有回忆 提交于 2019-12-03 08:27:28
问题 I get following error when I was running an app within Android Studio 2. Gradle tasks [:app:assembleDebug] Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug'. > Task with path 'dexDebug' not found in project ':app'. BUILD FAILED Here is the build.gradle for module buildscript { repositories { maven { url 'http://download.crashlytics.com/maven' } maven { url "http://dl.bintray.com/populov/maven" } } dependencies { classpath 'com.crashlytics.tools.gradle:crashlytics

Stack size becomes negative after instruction

这一生的挚爱 提交于 2019-12-03 08:13:29
It has been pointed out that the reason I am having this problem is because of proguard 4.9 , so I went ahead and updated to proguard-5.2.1. But I am still having the same problem. Has anyone found a solution? I confirmed the new version through java -jar /projects/tools/android-sdk-macosx/tools/proguard/lib/proguard.jar and my proguard-rule.pro is simply #---- Google Cloud Endpoint section # Needed by google-api-client to keep generic types and @Key annotations accessed via reflection -keepclassmembers class * { @com.google.api.client.util.Key <fields>; } -keepattributes Signature

Does ProGuard work with JavaEE 6 applications?

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to get Proguard to obfuscate a simple .war file. According to the docs Proguard handles .war files, but when I try I get this: Warning: class [WEB-INF/classes/com/corp/gr/t2b/T2BChannel.class] unexpectedly contains class [com.corp.gr.t2b.T2BChannel] The docs mention something about Proguard not liking .war files with classes in the WEB-INF/classes directory. So I put all the .class files in their own .jar file in WEB-INF/lib. Then Proguard complains that it cannot find any of the JavaEE 6 classes, even though I've given it the

android studio 3.5 Warning: The rule `-keep public class * extends androidx.versionedparcelable.VersionedParcelable { <init>(); }` uses extends

我的梦境 提交于 2019-12-03 06:55:57
问题 Today, I updated my Android Studio to 3.5. After updated, I found below warning when I try to run the app. The rule -keep public class * extends androidx.versionedparcelable.VersionedParcelable { (); } uses extends but actually matches implements. I know warning is related with my proguard rules. So, I double checked my proguard rule file, but I am sure I didn't add that rule and it is not in my proguard rule file. Below is the warning when I build the project. My project is using AndroidX.

ProGuard + Maven with Java 7

拥有回忆 提交于 2019-12-03 06:40:26
问题 I'm trying to make ProGuard part of our Maven build process. The problem is that the official Maven plugin is using ProGuard 4.3, which doesn't support Java 7. Is there any easy way to make the plugin use Proguard 4.8 instead? I've tried specifying the dependency for the plugin but ProGuard seems to have a new structure for Maven-modules (proguard-base, proguard-parent etc) so the plugin can't use any version >4.4. Here's how my current pom looks: <plugin> <groupId>com.pyx4me</groupId>