proguard

Xamarin Java.exe exited with code 1 (Proguard Issue)

自作多情 提交于 2019-11-29 13:05:07
Another day with Xamarin! Can't even build my first Hello World project! Not surprising, huh? So, fresh new Xamarin.Android blank project. Enabled ProGuard , link to SDK Assemblies Only and went on building the project. And wallah!! There's an error!(Wait, i shouldn't be surprised, right? After all, it's Xamarin). Here's the error : "java.exe" exited with code 1 Double-clicking the exception opens up Xamarin.Android.Common.Targets file and points to the ProGuard tag which is as follows : <Proguard Condition="'$(AndroidEnableProguard)' == 'True' and '$(_ProguardProjectConfiguration)' != ''"

Android Proguard java.io.IOException: Can't read [proguard.ClassPathEntry

我是研究僧i 提交于 2019-11-29 12:25:55
问题 Hi All When enabing proguard for android, while building the signed jar I get the following dump: [2011-02-03 11:28:27 - VideoCreator] Proguard returned with error code 1. See console [2011-02-03 11:28:27 - VideoCreator] java.io.IOException: Can't read [proguard.ClassPathEntry@49b290] (No such file or directory) [2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.readInput(InputReader.java:230) [2011-02-03 11:28:27 - VideoCreator] at proguard.InputReader.readInput(InputReader.java

Android组件化架构学习笔记——组件化编程之静态变量/资源/混淆/多渠道打包

廉价感情. 提交于 2019-11-29 11:24:06
一.组件化的静态变量: R.java的生成: 各个module会生成aar文件,并且被引用到Application module中,最终合并为apk文件。当各个次级module在Application module中被解压后,在编译时资源R.java会被重新解压到build/generated/source/r/debug(release)/包名/R.java中。 当每个组件中的aar文件汇总到App module中时,也就是编译的初期解析资源阶段,其每个module的R.java释放的同时,会检测到全部的R.java文件,然后通过合并,最后合并成唯一的一份R.java资源。 R2.java及 ButterKnife : ButterKnife 是一个专注于Android View的注入框架,可以大量的减少findViewById和setOnClickListener操作的第三方库。 注解中只能使用常量,如不是常量会提示attribute value must be contant的错误。可以在使用替代方法,原理是将R.java文件复制一份,命名为R2.java。然后给R2.java变量加上final修饰符,在相关的地方直接引用R2资源。 如项目中已经使用 ButterKnife 维护迭代了一段时间,那么使用R2.java的方案适配成本是最低的。

Android BadParcelableException only with signed apk

女生的网名这么多〃 提交于 2019-11-29 10:58:18
When I run my project from debug everything works fine. However when I run it with the signed apk I generated from Android Studio (using proguard), I get the following errors when using getParcelable: java.lang.RuntimeException: Unable to start activity ComponentInfo{mypackage.android/mypackage.mobile.android.activities.searchActivity}: android.os.BadParcelableException: Parcelable protocol requires a Parcelable.Creator object called CREATOR on class mypackage.android.a.d.a Why does this exception happen only with my signed apk? In my proguard config file I did have to use dontwarn android

Android Build with Gradle and ProGuard : “The output jar must be specified after an input jar, or it will be empty”

本秂侑毒 提交于 2019-11-29 10:54:19
问题 I'm creating a build with different flavors with Gradle. It used to run quite good until now, until I wanted to enable Proguard . I enabled minifyEnabled for my Release Build and now I'm having an exception saying : " Caused by: org.gradle.internal.UncheckedException: java.io.IOException: The output jar [.../app/build/intermediates/multi-dex/dev/release/componentClasses.jar] must be specified after an input jar, or it will be empty. " Does anybody know what is causing this exception ? I

Android & Proguard?

ⅰ亾dé卋堺 提交于 2019-11-29 10:14:26
问题 I am trying to use progurard with my android applications. The proguardGui accepts an input, and an output, the input requires a jar file. but the APK file for android doesn't contain any jar? I tried passing the apk file, and also the dex file inside the apx, but proguard doesn't accept them as an input. proguard only accepts jars, ears, wars, zips so how can i use the proguard gui with my android application? 回答1: I detailed complete instructions on how to do it here: http://www

Obfuscated code

删除回忆录丶 提交于 2019-11-29 09:45:28
问题 I was asked to crate a simple app for android. The first one in fact that I'll be paid for, so I really don't want to screw it up :). One of the requirements was that the code must be obfuscated. I learned the general idea of obfuscating, but I don't want to make any silly mistakes. What precisely do I have to do to make the code obfuscated? Does exporting it as release do the job, or some other steps are required? Any remarks are also appreciated. PS. I'm using Eclipse if it matters. EDIT

ProGuard: “java.exe” exited with code 1 after adding ModernHTTPClient

送分小仙女□ 提交于 2019-11-29 08:46:33
In the Xamarin.Forms project I added ModernHTTPClient library and now the ProGuard step breaks with error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2025,3): error MSB6006: "java.exe" exited with code 1. (Previously, I had some issues with ProGuard but was able to get it to work while targeting Android 7.1 by upgrading ProGuard to latest version.) Some of the details from the log file are below. 2> Proguard (TaskId:363) 2> AndroidSdkDirectory: C:\android-sdk\ (TaskId:363) 2> JavaPlatformJarPath: C:\android-sdk

Proguard breaking audio file in assets or raw

有些话、适合烂在心里 提交于 2019-11-29 07:30:10
I have an activity that plays a beep sound with MediaPlayer that works fine and used to work fine even in the proguarded production version. With the latest release it now suddenly crashes with Caused by: android.content.res.Resources$NotFoundException: File res/raw/beep.ogg from drawable resource ID #0x7f060000 at android.content.res.Resources.openRawResourceFd(Resources.java:994) at android.media.MediaPlayer.create(MediaPlayer.java:855) at com.digikey.mobile.activity.CaptureActivity.onCreate(SourceFile:135) at android.app.Activity.performCreate(Activity.java:5206) at android.app

Does Proguard remove comments from Java source

本秂侑毒 提交于 2019-11-29 07:02:19
I am using the code from proguard-android.txt file below # This is a configuration file for ProGuard. # http://proguard.sourceforge.net/index.html#manual/usage.html -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose # Optimization is turned off by default. Dex does not like code run # through the ProGuard optimize and preverify steps (and performs some # of these optimizations on its own). -dontoptimize -dontpreverify # Note that if you want to enable optimization, you cannot just # include optimization flags in your own project configuration file; # instead you will need to