proguard

admob ads are not shown with pro guard

旧城冷巷雨未停 提交于 2019-11-28 09:17:48
I developed android app and I used admob sdk 6.2.1 for showing ads, and when I tested the app on my real device and on the emulator,ads are shown. but when I apply pro guard to my app and test it on my device(I tested it on another devices also) ads are not shown up, any help please! Add this to your proguard: -keep class com.google.ads.** # Don't proguard AdMob classes -dontwarn com.google.ads.** # Temporary workaround for v6.2.1. It gives a warning that you can ignore cprcrack From the docs : To safely use ProGuard with Google Mobile Ads, add the following to your ProGuard config: -keep

What is dex in Gradle

风格不统一 提交于 2019-11-28 09:16:47
What is the dex in Gradle or in Android? In Gradle, what's the meaning of dexoptions ? Sometimes my project does not compile because of some dexerrors. I need to activate ProGuard to compile my Android app. In the standard java world: When you compile standard java code : the compiler produce *.class file. A *class file contains standard java bytecode that can be executed on a standard JVM. In the Android world: It is different. You use the java language to write your code, but the compiler don't produce *.class files, it produce *.dex file. A *.dex file contains bytecode that can be executed

Android release APK crash with java.lang.AssertionError: impossible in java.lang.Enum

十年热恋 提交于 2019-11-28 08:56:45
I've just built an APK using Gradle for release (ProGuard 4.9 and signed). When I launch the app it crash on this error : E/AndroidRuntime( 8662): java.lang.AssertionError: impossible E/AndroidRuntime( 8662): at java.lang.Enum$1.create(Enum.java:44) E/AndroidRuntime( 8662): at java.lang.Enum$1.create(Enum.java:35) E/AndroidRuntime( 8662): at libcore.util.BasicLruCache.get(BasicLruCache.java:54) E/AndroidRuntime( 8662): at java.lang.Enum.getSharedConstants(Enum.java:210) E/AndroidRuntime( 8662): at java.lang.Enum.valueOf(Enum.java:190) E/AndroidRuntime( 8662): at kr.infli.s.Z(Inflikr.java:390)

How to tell ProGuard to keep private fields without specifying each field

醉酒当歌 提交于 2019-11-28 08:55:39
This is my class: package com.tools.app.holiday; public class Holiday { private String name; private Calendar dateFrom = Calendar.getInstance(); private Calendar dateTo = Calendar.getInstance(); ... I can keep these private fields by putting the following in my ProGuard rules file: -keepclassmembers class com.tools.app.holiday.Holiday { private java.lang.String name; private java.util.Calendar dateFrom; private java.util.Calendar dateTo; } But I'd prefer not to have to specify each field individually. How can I do this? P.S. I stole most of this from Proguard keep classmembers because that

How to obfuscate my android project in eclipse IDE?

拜拜、爱过 提交于 2019-11-28 08:35:55
I want minimize my app size as well as avoid the app from reverse-engineering. Can anybody help with simple answer? Proguard is part of the android eclipse plugin, so you do not have to invoke it manually. You just need to activate it on your build. To enable ProGuard so that it runs as part of an Ant or Eclipse build, set the proguard.config property in the <project_root>/project.properties file. The path can be an absolute path or a path relative to the project's root. For some situations, the default configurations in the proguard.cfg file will suffice. However, many situations are hard for

CardView shadow not appearing in Lollipop after obfuscate with proguard

不打扰是莪最后的温柔 提交于 2019-11-28 08:29:21
问题 My CardView's shadows have disappeared on Lollipop devices after applying Proguard. I haven't defined any rule to protect this library, because I haven't read it was necessary at all. I attach you a couple of screenshots, first without running proguard, and secon after running it. Screenshot without proguard Screenshot with proguard And this is my xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http:

How to use -dontwarn in ProGuard?

落爺英雄遲暮 提交于 2019-11-28 08:03:12
I am using android studio to build debug and release application. When i build debug/release application ./gradlew assembleDebug ./gradlew assembleRelease both build are created perfectly and run as well. Shows appropriate dialog box for debug or release now i have added proguard details in build.gradle: signingConfigs { myConfig { storeFile file("keystore.jks") storePassword "abc123!" keyAlias "androidreleasekey" keyPassword "pqrs123!" } } buildTypes { release { runProguard true proguardFile getDefaultProguardFile('proguard-android-optimize.txt') signingConfig signingConfigs.myConfig } }

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

一笑奈何 提交于 2019-11-28 06:53:42
问题 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 :

How to configure proguard to ONLY remove android logging calls

故事扮演 提交于 2019-11-28 06:28:42
I'm trying to configure proguard to ONLY remove calls to android.util.Log from my Android app (for the release build). I specifically don't want proguard to do any obfuscation or minification of the code. This is the configuration I've tried but it doesn't remove the Log calls (I assume because of the -keep class ** ) -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*

How to use Kotlin with Proguard

≯℡__Kan透↙ 提交于 2019-11-28 06:11:44
I'm trying to add Kotlin to my project and I need to use proguard. Which rules should I add to proguard to support Kotlin? Thank you You don't need to do anything special. Kotlin works with ProGuard out of the box. But you may face some strange errors when processing your application with ProGuard. In this case just add -dontwarn kotlin.** Also if you want to get rid of null checks at runtime you may use the following rule: -assumenosideeffects class kotlin.jvm.internal.Intrinsics { static void checkParameterIsNotNull(java.lang.Object, java.lang.String); } -keep class kotlin.** { *; } -keep