proguard

Use Proguard for Scala AWS Lambda

折月煮酒 提交于 2019-12-04 09:50:39
I have a question regarding the usage of proguard together with a scala aws lambda function. I have created a very simple aws lambda function like this: package example import scala.collection.JavaConverters._ import com.amazonaws.services.lambda.runtime.events.S3Event import com.amazonaws.services.lambda.runtime.Context object Main extends App { def kinesisEventHandler(event: S3Event, context: Context): Unit = { val result = event.getRecords.asScala.map(m => m.getS3.getObject.getKey) println(result) } } I have imported the following packages: "com.amazonaws" % "aws-lambda-java-core" % "1.1.0"

Getting MultiDex Error, even after setting Min SDK 21

六月ゝ 毕业季﹏ 提交于 2019-12-04 09:46:00
The project i am working on has around 180k Methods. I have read blogs, and articles where its written that if you set your Min SDK to 21 , then you don't need MultiDex . But if i remove MultiDex from here it gives me the 65k MultiDex error message. Following is my gradle file. I don't know whether i failed to understand the concept or something else. Kindly guide me. compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId 'com.myapp.app' minSdkVersion 21 targetSdkVersion 23 versionCode 59 versionName "1.0.1" multiDexEnabled true ndk { abiFilters "armeabi", "armeabi-v7a",

How to configure Proguard using Gradle?

无人久伴 提交于 2019-12-04 09:35:05
问题 I recently switched to Android Studio / Gradle and I am wondering, how ProGuard can be configured in the build.gradle script. I am new to Gradle, but I thought, configuring the Proguard task would be a good idea (as documented in the Proguard project documentation. I want to configure Proguard to save the mapping in different files for different product flavors with the 'printmapping' setting task myProguardTask(type: proguard.gradle.ProGuardTask) { printmapping file("test.txt") } but it

Android Build fails using Proguard and Gradle

僤鯓⒐⒋嵵緔 提交于 2019-12-04 09:29:31
I have recently converted a project from eclipse/ant to using Android Studio/Gradle. My debug build works fine but when I attempt to do a release build with proguard enabled it fails with the following error 16:26:13.437 [ERROR] [system.err] Unexpected error while computing stack sizes: 16:26:13.438 [ERROR] [system.err] Class = [com/a/a/a/d/d] 16:26:13.438 [ERROR] [system.err] Method = [<clinit>()V] 16:26:13.438 [ERROR] [system.err] Exception = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [143] swap in [com/a/a/a/d/d.<clinit>()V]) I have used the same

Android studio 1.1.0 setting minifyEnabled true causing issues with app

≡放荡痞女 提交于 2019-12-04 09:16:30
问题 Here's my gradle.build file defaultConfig { minSdkVersion 15 targetSdkVersion 21 versionCode 2 versionName "1.0" } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } Proguard-rules.pro file -keepclassmembers class * extends de.greenrobot.dao.AbstractDao { public static java.lang.String TABLENAME; } -keep class **$Properties -dontwarn com.squareup.** -dontwarn okio.** -dontwarn retrofit.** -dontwarn org.joda.time.**

Android Proguard SqlCipher NoClassDefFoundError

邮差的信 提交于 2019-12-04 09:04:10
Have been battling with Proguard all day and have tried many examples and solutions on the official Proguard site as well as StackOverflow. I have a large project I need to obfuscate, which has a number of referenced library projects and Jars. I am getting 725 warnings from proguard from 2 libs, com.google.common and twitter4j. I can happily get the project to compile if I add the following: -dontwarn com.google.common.** -dontwarn twitter4j.** However, the app crashes instantly on open, so this seems to just be a way of hiding an issue, not fixing it. The proguard-project.txt is in the

Android Studio - ProGuard IOException Duplicate Zip Entry

耗尽温柔 提交于 2019-12-04 08:57:04
So I am trying to set up ProGuard in Gradle for my Android Studio project and I get the following error when building the project: Error:Execution failed for task ':app:proguardDebug'. java.io.IOException: Can't write [C:\Users\Rich\Desktop\WebProjects\AndroidStudioProjects\Roomie\app\build\intermediates\classes-proguard\debug\classes.jar] (Can't read C:\Users\Rich\Desktop\WebProjects\AndroidStudioProjects\Roomie\app\libs\bolts-android-1.1.4.jar(;;;;;;!META-INF/MANIFEST.MF)] (Duplicate zip entry [a/a.class == bolts-android-1.1.4.jar:bolts/AggregateException.class])) Here is my proguard-rules

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForDebug'

烈酒焚心 提交于 2019-12-04 08:38:11
I must use certain librairy in my project. When I want bebu my application I receive an indication which says to me that my code exceeds 65k method. Thus I decided to use Proguard. But I receive this error. my code of buile.gradle apply plugin: 'com.android.application' apply plugin: 'realm-android' android { compileSdkVersion 24 buildToolsVersion "24.0.0" defaultConfig { applicationId "transplusafrica.delydress" minSdkVersion 19 targetSdkVersion 24 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'),

how to use -assumenosideeffects class android.util.Log in my app

故事扮演 提交于 2019-12-04 08:14:15
I write -assumenosideeffects class android.util.Log in my app. but how to use this. -assumenosideeffects class android.util.Log { public static int d(...); public static int v(...); public static int i(...); public static int e(...); } in proguard.cfg file. but not working. Yevgen Kulik The manual says -assumenosideffects is "Only applicable when optimizing" . ${sdk.dir}/tools/proguard/proguard-android.txt says: "Optimization is turned off by default. Dex does not like code run through the ProGuard optimize and preverify steps" . http://researcharea.blogspot.com/2012/04/assumenosideeffects-not

Proguard is ruining my cleanliness. Gson and generics

穿精又带淫゛_ 提交于 2019-12-04 07:58:04
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> I just do: SharedPreferencesHelper.loadList<String>