proguard

Gradle Build Failure java.io.IOException: The output jar is empty

浪子不回头ぞ 提交于 2019-12-24 00:57:03
问题 My android studio project builds fine when running the app normally, but when I try to run tests I get the following gradle error message: :app:transformClassesWithMultidexlistForDebugAndroidTest FAILED Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebugAndroidTest'. > java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options? Information:BUILD FAILED Information:Total time: 27.049 secs Information:1 error Information:0 warnings

ProGuard leads to NullPointerException

送分小仙女□ 提交于 2019-12-23 21:51:05
问题 When setting minifyEnabled true in my gradle I get a NullPointerException when starting my app: java.lang.RuntimeException: Unable to start activity ComponentInfo{de.ae.formulaecalendar/de.ae.formulaecalendar.view.calendar.CalendarActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference at android.app.ActivityThread

How to properly quote a path in an ant task?

馋奶兔 提交于 2019-12-23 21:40:45
问题 I want to call the <proguard> task in Ant and need to pass it the paths to various JAR files, e.g. the equivalent of: <proguard> -injars /some/path/jar1;/some other path/jar2 </proguard> Problem is, some of these path may contain spaces or special characters, they have to be quoted like this as explained in the proguard manual: <proguard> -injars /some/path/jar1;"/some other path/jar2" </proguard> It doesn't work to quote the whole argument, the individual paths need to be quoted separately.

proguard causing EnumMap NPE on dynamically declared method

≡放荡痞女 提交于 2019-12-23 20:24:39
问题 I'm adding obfuscation via proguard/maven to a java application as we prepare it for distribution. During the process, it errors out with: Note: ...eventlib.EventManager accesses a declared method 'getHandlerList()' dynamically It then lists a dozen classes with that method with Maybe this is... and it recommends using -keep to avoid the problem. When I do add -keep public class my.package.info.eventlib.HandlerList { *; } to the build process, the error goes away, but I see the following

android热修复之Robust使用(真正的入门)

会有一股神秘感。 提交于 2019-12-23 20:02:54
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 目前能够实现热修复的方案很多,各个方案的优缺点这里也不在一一比较了,这篇文章主要针对第一次尝试集成美团点评基于Instant Run的热修复方案的开发者。 Robust的GitHub地址: https://github.com/Meituan-Dianping/Robust 。 1.在APP的build.gradle,加入依赖: apply plugin: 'com.android.application' //apply plugin: 'auto-patch-plugin' //制作补丁时将这个打开 apply plugin: 'robust' //生成apk时把这个打开 dependencies{ compile 'com.meituan.robust:robust:0.3.2' } 下面是我的项目APP的build.gradle,大家可以当做参考: apply plugin: 'com.android.application' //apply plugin: 'auto-patch-plugin' apply plugin: 'robust' android { compileSdkVersion 25 buildToolsVersion "25.0.3" defaultConfig {

Getting NoClassDefFoundError while trying to use Proguard and SQLcipher in Android

与世无争的帅哥 提交于 2019-12-23 18:15:59
问题 I am getting a ava.lang.NoClassDefFoundError: net/sqlcipher/CursorWindow when trying to run my app using sqlicipher and proguard. The project works perfectly without proguard enabled. The first time I use sqlcipher to create a new db I get the error above. I have looked at another SO question that is seemingly identical, but I have tried the answers from that question and I'm still getting the error. Android Proguard SqlCipher NoClassDefFoundError Here is my entire proguard-properties :

Is there a way to use ProGuard with MonoDroid?

两盒软妹~` 提交于 2019-12-23 17:27:47
问题 Our development team just (mostly) finished an Android app using MonoDroid in Visual Studio. Because it has to do with banking, we wanted to try to obfuscate it in order to add some security against anyone trying to decompile it. Initially, I figured I could just use ProGuard, but there doesn't seem to be a project.properties file that I can edit in Visual Studio. Can anyone shine some glorious helping light on this subject and tell me if it is possible to use ProGuard with Mono and my

smack for android fails when using proguard

≯℡__Kan透↙ 提交于 2019-12-23 16:54:55
问题 I am using the smack library (4.1.2) in my Android app to connect to an XMPP server. It runs perfectly well when the code is NOT minified (ie with proguard). But in release mode, with proguard enabled, the app crashes as soon as it connects to the server. I am trying to keep all relevant smack classes unminified as suggested here: What are the recommended ProGuard rules for Smack 4.1? -keep class org.jivesoftware.smack.** { *; } -keep class org.jivesoftware.smackx.** { *; } But for me this

Use Proguard for stripping unused Support lib classes

房东的猫 提交于 2019-12-23 15:10:56
问题 I'm adding the Android Support library to my project and I've noticed the resulting APK file inflates in size quite a bit. What I'm trying to do is use Proguard to remove classes in the library that I don't use, e.g. the backword compatible Notification builder class (in fact, I tested this without even using anything from the Support lib, I just dropped it in my /libs folder). My proguard.cfg is exactly what's in <sdktools>\tools\proguard\proguard-android.txt , with my own addition of

Obsucate filenames with proguard

谁说胖子不能爱 提交于 2019-12-23 15:05:35
问题 I'm obfuscating my apk with proguard and Android Studio. When I decompilate my apk, I can see a lot of file like aaa.java, aab.java. etc... but all files from my project has the original name. Is there a way to obfuscate filenames of my project???? Here is my proguard-rules.pro ##---------------Begin: proguard configuration common for all Android apps ---------- -optimizationpasses 5 -dontskipnonpubliclibraryclassmembers -dontpreverify -dump class_files.txt -printseeds seeds.txt -printusage