proguard

Android FileProvider class not found in release builds

不想你离开。 提交于 2019-12-09 16:11:56
问题 I'm using a FileProvider to get photos from the device. The implementation works just fine in debug builds (minifyEnabled false) but when I'm building the release build (minifyEnabled true) I get an error: java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.package.name-2/base.apk"], nativeLibraryDirectories=[/data

How to obfuscate only few class or a single package?

我们两清 提交于 2019-12-09 15:55:46
问题 I would not obfuscate all my project but just the mostly key class. how to write the proguard file to exclude all project and obfuscate only a single class or a single package ? 回答1: Please read the answer before downvote. You need ! before your class. Take a look at Proguard Manual: Keep option part and Android example . Example : -keeppackagenames com.vtcmobile { ! com.yourpackage.CategoryParser // keep package com.vtcmobile excluded class com.vtcmobile.CategoryParser } Edit: Use

Android code obfuscation with ProGuard…how does one know it's been obfuscated?

99封情书 提交于 2019-12-09 15:49:03
问题 I have an Android project that I recently published to the market after running it through obfuscation with ProGuard. The project exported without any complications, but how do I know it's been obfuscated? Is there anything I could do to verify that obfuscation was successful? 回答1: Try to reverse engineer your own application. See what you can read in the code. Use the following questions: decompiling DEX into Java sourcecode http://www.taranfx.com/decompile-reverse-engineer-android-apk 回答2:

ProGuard can cause incorrect calculations

前提是你 提交于 2019-12-09 09:42:20
问题 I have met a pretty strange bug. The following small piece of code uses a rather simple math. protected double C_n_k(int n, int k) { if(k<0 || k>n) return 0; double s=1; for(int i=1;i<=k;i++) s=s*(n+1-i)/i; return s; } Edit Using ProGuard can make it go wrong on some devices. I have it confirmed on HTC One S Android 4.1.1 build 3.16.401.8, but judging by e-mails I got, a lot of phones with Android 4+ are affected. For some of them (Galaxy S3), american operator-branded phones are affected,

Proguard can't find referenced class com.google.ads.internal.state.AdState

放肆的年华 提交于 2019-12-09 08:09:07
问题 Ok guys so this becoming extremely annoying trying to get my project to work when exporting/ Progaurd keeps giving me this error: Proguard returned with error code 1. See console Here is the full error i get in the console: Warning: com.google.ads.m: can't find referenced class com.google.ads.internal.state.AdState [2012-10-23 18:14:20 - com.fttech.monkey_toss.Menu] Warning: com.google.ads.m: can't find referenced class com.google.ads.internal.state.AdState [2012-10-23 18:14:20 - com.fttech

Obfuscating ActionBarSherlock with Proguard

隐身守侯 提交于 2019-12-09 04:30:45
问题 I'm trying to obfuscate my android application using proguard and ant ( eclipse + proguard never works, always fails with error 1 ). But I'm getting class file ... unexpectedly contains class ... warning all aver the place and the build fails. I also tried with -ignorewarnings option in proguard . The build suceeds but I get an unusable package. Here's the ant output: -post-compile: optimize: [jar] Building jar: /home/binoy/git/Vibhinna/proguard/unoptimized.jar [java] ProGuard, version 4.8

Android Proguard skip external jar

烈酒焚心 提交于 2019-12-08 22:53:12
问题 I tried to use Proguard in my Android project, i setup Proguard using command line 'android update project /path/to/project' and file proguard.cfg was created in project's root directory. (In my Eclipse with Android 2.3 sdk, when create a new project, proguard.cfg file is not automatically created so i have to add it manually using command line). When i export the project, i got the following errors [2011-02-06 09:02:49 - TestProject] Warning: oauth.signpost.jetty.HttpRequestAdapter: can't

ProGuard didnt compile with Joda Time used in Windows

你。 提交于 2019-12-08 19:23:04
问题 Actually this is an answer and not a question anymore: I did spent many hours on Windows using JodaTime to be included in my Android project using ProGuard Proguard Configuration: -libraryjars C:\Users\Reto\Documents\GitHub\advanceIT\LoveClockPAY\libs\joda-time-2.1.jar I had the following errors: ProGuard didnt find my JAR and said: Can't read [C:\Users\Reto\Documents\GitHub\advanceIT\LoveClockPAY\libs\joda-time-2.1.jar] (No such file or directory) Solution -libraryjars libs/joda-time-2.1.jar

Gradle dependency causing error “Invalid Magic Number”

99封情书 提交于 2019-12-08 17:38:23
问题 I have a project on GitHub that I work on both in the office at home. For about 2 months it was working fine on both machines. Then two weeks ago, it stopped running on my home PC, but still works fine on my work PC . This is the error I get: :app:shrinkDebugMultiDexComponents FAILED FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:shrinkDebugMultiDexComponents'. java.io.IOException: Can't read [D:\dev\gitRepo\app\android\app\build\intermediates\multi

App on release crashes, while on debug doesn't

六月ゝ 毕业季﹏ 提交于 2019-12-08 17:36:14
问题 I'm developing an app using Android Studio, and when I switched from debug to release build variant, it began to crash. While on debug it doesn't happen anything at all. The real problem is that I can't find where is the true error, as every reference is renamed. Have you faced an error like this, that has happened only on release ? The printed stack is this: 04-11 08:28:42.756 5997-5997/com.korcholis.clothio E/ActivityThread﹕ Failed to inflate android.view.InflateException: Binary XML file