proguard

remove unused classes with proguard for Android

天涯浪子 提交于 2019-12-03 10:05:30
问题 History/Context I have a project[1] where size really matters - recently I moved stuff to a shared lib[2] and thought proguard will take care and remove the unused classes because I had a config that was drastically reducing the size but by using the lib i came over the magic 100kb mark so I investigated: classes which I do not use for sure are in the resulting dex file - and even with full name ( not shortened to single-char ) - e.g. I see the SquareView in the dex which I in no way use in

Android Library module use proguard

匿名 (未验证) 提交于 2019-12-03 09:58:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to create secure library module that no one can extract code from apk file. but when try to enable proguard in library gradle getting error package does not exists. then i add following line in proguard rules file -keep class com.alprocr.** { *; } -keep class com.xyz.alpr.** { *; } -keep class com.xyz.alpr.doc.** { *; } after add this code app working file. but when i extract code from apk using apktool then i got complete source code from apk file. I want non-readable code when someone try to extract apk file. Is it possible? i also

How to obfuscate everything but public method names and attributes with proguard?

。_饼干妹妹 提交于 2019-12-03 09:55:50
问题 I'm building an android framework and I need to obfuscate and shrink the jar to ship it to users. I'm using the proguard tool included in the android SDK and I have the following requirements for the output jar: keep all the classes included in the input jar, but obfuscate them. don't obfuscate the class names of the classes called in the `AndroidManifest.xml don't obfuscate the class name and public method names/attributes for the class that is used has an interface for the user, however do

using jsoup with proguard closing force close

ぃ、小莉子 提交于 2019-12-03 09:48:16
EDIT : MY PROGUARD VERSION IS 4.7 Today I tried include jsoup (version 1.7.1) in my android application, but it is causing me a lot of troubles. When I exported the signed apk with proguard turned on everytime my application was facing force close issues, then i disabled proguard and exported the apk and it ran perfectly. Please help me. How can I solve the error? The stacktrace is as below: java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:278) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java

Fatal signal 11 after enabling proguard

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I create my app and lauch it from my IDE ( Eclipse ) app is working great, but when I build APK, it's crashing, but I can't figure out why? It shows Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1) . I uses https://github.com/puelocesar/android-lib-magick library in my app. Thanks in Advance.. 06-15 13:39:21.830: I/DEBUG(8010): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 06-15 13:39:21.830: I/DEBUG(8010): Build fingerprint: 'samsung/GT-I9100/GT-I9100:4.0.4/IMM76L/eng.build.20130311.122614:eng/release-keys' 06-15 13

Android Studio & ProGuard: cannot resolve symbol getDefaultProguardFile?

送分小仙女□ 提交于 2019-12-03 09:11:17
问题 IDE : Android Studio 1.1.0 Subject : ProGuard Problem : ProGuard files or tools not recognized by Android Studio, getDefaultProguardFile can not be resolved and there's no proguard-android.txt and proguard-rules.txt files in the app, see the image below: (from build.gradle) How to fix this and achieve ProGuard protection to my App ? 回答1: Try to change into - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 回答2: I had the same trouble as shown here: The error

Proguard with OrmLite on Android

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How should I use proguard with ormlite library on Android? Trying this: -keep class com.j256.** -keepclassmembers class com.j256.** -keep enum com.j256.** -keepclassmembers enum com.j256.** -keep interface com.j256.** -keepclassmembers interface com.j256.** But I get: 03-23 20:23:54.518: E/AndroidRuntime(3032): java.lang.RuntimeException: Unable to start activity ComponentInfo{cz.eman.android.cepro/cz.eman.android.cepro.activity.StationsOverviewActivity}: java.lang.IllegalStateException: Could not find constructor that takes a Context

Using proguard with GSON and RoboGuice fails when using a EnumTypeAdapter

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When trying to use a EnumTypeAdapter with Proguard, it results in a AssertionError in Gson.getAdapter(). This error seems to be due to type information being lost... below is all the relevant source code: The Exception: 03-18 13:27:12.905: ERROR/roboguice(12139): Throwable caught during background processing java.lang.AssertionError at com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter.<init>(Unknown Source) at com.google.gson.internal.bind.TypeAdapters$24.create(Unknown Source) at com.google.gson.Gson.getAdapter(Unknown Source) The

Proguard problems with apk creation

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: OK This is driving me nuts since a day. I am mainly an iOS guy so i dont know much about Proguard and stuff. I have made an Android app which includes both dropbox and Google Drive API. The app is working great if i deploy it on a phone thru Eclipse but I am getting a nasty error on Console when i try to export the app for apk file generation. My project.properties files was like so... # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): proguard.config=${sdk.dir}/tools/proguard

What are features of using Proguard in project with Protocol Buffers?

匿名 (未验证) 提交于 2019-12-03 08:56:10
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a project in where Google Protocol Buffers are used. Once I try to obfuscate it with ProGuard it seems that protobuf causes problem. All my own classes I package into mybuildedclasses.jar . Google code is packaged into protbuf.jar mybuildedclasses.jar protobuf.jar other external jars After that I am trying to obfuscate mybuildedclasses.jar . Config file is similar to this one . Eventually all jars are packaged inside another fat jar. I run the program and once message is tried to be sent this kind of Exceptions are printed. Caused by: