HMS Dexguard Obfuscation issue - android

I have implemented dexguard in my application. Application is working when no obfuscation is done but crashes as dexguard obfuscation is done.
it gives the error.
Caused by: android.view.InflateException: Binary XML file line #0 in com.avanza.ambitwizhmb:layout/2131558492: Error inflating class fragment
Caused by: com.huawei.hms.maps.model.RuntimeRemoteException: AppId is null. Please check whether the agconnect-services.json file is added to your app project.
the dexguard rules for huawei is:
-keep class com.huawei.agconnect.**{*;}
-dontwarn com.huawei.agconnect.**
-keep class com.hianalytics.android.**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class com.huawei.hms.**{*;}
-keep interface com.huawei.hms.analytics.type.HAEventType{*;}
-keep interface com.huawei.hms.analytics.type.HAParamType{*;}

If Dexguard obfuscation is used during app packaging, you need to configure the following:
-ignorewarnings
-keep class com.huawei.agconnect.** {*;}
-keepresourcexmlelements **
-keepresources /

Related

java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/naming/ldap/LdapName

I have implemented ProGuard to cut off unnecessary codes. But after the app starts, I am getting the following error -
java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/naming/ldap/LdapName;
at b.a.b.e.d.a.b(Unknown Source)
at b.a.b.e.d.a.a(Unknown Source)
at b.a.b.e.d.a.a(Unknown Source)
at b.a.b.e.d.a.a(Unknown Source)
at b.a.b.e.d.f.a(Unknown Source)
at b.a.b.e.d.f.a(Unknown Source)
at b.a.b.e.d.f.a(Unknown Source)
at b.a.b.h.c.h.a(Unknown Source)
at b.a.b.h.c.p.a(Unknown Source)
at b.a.b.h.b.o.a(Unknown Source)
at b.a.b.h.b.o.a(Unknown Source)
at b.a.b.h.b.a.a(Unknown Source)
at b.a.b.h.b.h.a(Unknown Source)
at b.a.b.h.b.h.a(Unknown Source)
at b.a.b.h.b.h.execute(Unknown Source)
at com.c.a.ae.a(Unknown Source)
at com.c.a.b.a(Unknown Source)
at com.c.a.aa.run(Unknown Source)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.naming.ldap.LdapName" on path: DexPathList[[zip file "/data/app/bd.com.chalo-1/base.apk"],nativeLibraryDirectories=[/data/app/bd.com.chalo-1/lib/arm64, /data/app/bd.com.chalo-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
... 19 more
Suppressed: java.lang.ClassNotFoundException: javax.naming.ldap.LdapName
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 20 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
What should I do now? Does it something to do with my library?
Android’s documentation for ProGuard describes it like so:
“The ProGuard tool shrinks, optimizes, and obfuscates your code by removing unused code and renaming classes, fields, and methods with semantically obscure names. The result is a smaller sized .apk file that is more difficult to reverse engineer…. Having ProGuard run is completely optional, but highly recommended.”
Now adding proguard can cause problems if your app contain third party libraries, broadcast receivers, custom widgets etc.. so you need to add proguard rules to add this classes in runtime otherwise the classes will not compile in APK version and you will get errors
For details about proguard and it's usage see this link:http://omgitsmgp.com/2013/09/09/a-conservative-guide-to-proguard-for-android/
there is a standard proguard rules form which you can use:
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Obfuscation parameters:
#-dontobfuscate
-useuniqueclassmembernames
-keepattributes SourceFile,LineNumberTable
-allowaccessmodification
# Ignore warnings:
#-dontwarn org.mockito.**
#-dontwarn org.junit.**
#-dontwarn com.robotium.**
#-dontwarn org.joda.convert.**
# Ignore warnings: We are not using DOM model
-dontwarn com.fasterxml.jackson.databind.ext.DOMSerializer
# Ignore warnings: https://github.com/square/okhttp/wiki/FAQs
-dontwarn com.squareup.okhttp.internal.huc.**
# Ignore warnings: https://github.com/square/okio/issues/60
-dontwarn okio.**
# Ignore warnings: https://github.com/square/retrofit/issues/435
-dontwarn com.google.appengine.api.urlfetch.**
# Keep the pojos used by GSON or Jackson
-keep class com.futurice.project.models.pojo.* { ; }
# Keep GSON stuff
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.* { ; }
-keep public class Socket
# Keep Jackson stuff
-keep class org.codehaus.* { ; }
-keep class com.fasterxml.jackson.annotation.* { ; }
# Keep these for GSON and Jackson
-keepattributes Signature
-keepattributes Annotation
-keepattributes EnclosingMethod
# Keep Retrofit
-keep class retrofit.* { ; }
-keepclasseswithmembers class * {
#retrofit.** *;
}
-keepclassmembers class * {
#retrofit.** *;
}
-keep public class com.mikhaellopez:circularimageview:2.1.1.* { ; }
# Keep Picasso
-keep class com.squareup.picasso.* { ; }
-keepclasseswithmembers class * {
#com.squareup.picasso.** *;
}
-keepclassmembers class * {
#com.squareup.picasso.** *;
}
add this rules in your proguard files ...
For details of the standard form see this:https://github.com/futurice/android-best-practices/blob/master/templates/rx-architecture/app/proguard-rules.pro
and this:
https://gist.github.com/Jackgris/c4a71328b1ae346cba04

Android Cling/Upnp proguard

I have created app using Cling and is working fine but when I create release build I get following message and nothing plays on renderer:
11-22 16:24:53.341 20172-20172/? I/RendererCommand﹕ TrackMetadata : TrackMetadata [id=1, title=IMG-20151120-WA0007, artist=, genre=, artURI=res=http://192.168.1.4:8089/1.jpg, itemClass=object.item.imageItem]
11-22 16:24:53.345 20172-20172/? V/RendererCommand﹕ Resume
11-22 16:24:53.351 20172-20301/? W/RendererCommand﹕ Fail to stop ! Error: Current state of service prevents invoking that action. Error writing request message. Can't transform message payload: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType. (HTTP response was: 500 Internal Server Error)
11-22 16:24:53.351 20172-20301/? I/RendererCommand﹕ Set uri to http://192.168.1.4:8089/1.jpg
11-22 16:24:53.353 20172-20386/? D/RendererCommand﹕ Update state !
11-22 16:24:53.354 20172-20264/? W/RendererCommand﹕ Fail to set URI ! Error: Current state of service prevents invoking that action. Error writing request message. Can't transform message payload: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType. (HTTP response was: 500 Internal Server Error)
11-22 16:24:53.354 20172-20262/? W/RendererCommand﹕ Fail to get position info ! Error: Current state of service prevents invoking that action. Error writing request message. Can't transform message payload: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType. (HTTP response was: 500 Internal Server Error)
11-22 16:24:54.354 20172-20386/? D/RendererCommand﹕ Update state !
Below is my proguard enteries:
-dontoptimize
-dontshrink
-dontskipnonpubliclibraryclasses
-dontpreverify
-allowaccessmodification
-verbose
-dontwarn org.fourthline.cling.**
-dontwarn org.seamless.**
-dontwarn org.eclipse.jetty.**
-dontwarn android.support.v4.app.**
-dontwarn android.support.design.widget.**
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keep class javax.** { *; }
-keep class org.** { *; }
-keep class org.fourthline.cling.** { *;}
-keep class org.seamless.** { *;}
-keep class org.eclipse.jetty.** { *;}
-keep class org.slf4j.** { *;}
-keep class javax.servlet.** { *;}
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keepattributes *Annotation*
Ok after having reading proguard manual, and having numerous hit and trials I finally did it by modifying last line of above prguard file to
-keepattributes Annotation, InnerClasses, Signature
and every thing works fine
from proguard
Specifies the generic signature of the class, field, or method. Compilers may need this information to properly compile classes that use generic types from compiled libraries. Code may access this signature by reflection.
and issue is of reflection
proguard is corrupting ie touching classes/interfaces in the Cling lib and you need to prevent that...
you could start here assuming you have a problem with Proguard touching some networking related in the Jetty/Http stack i guess from the content of your error. Wild guess is that its as if the http entity or body cant be handled as implementing the proper interfaces... You want to config proguard to avoid all interfaces in that library and you dont have any "keep interface" directives in your proguard...
For example, are you telling proguard not to touch any of the interfaces in 'org.eclipse.jetty' . You are not doing that and you might want to .
see here
scan proguard manuals for -keepinterface to use with jetty packages implementing the server/http connections in your lib.
know more about the 'cling' packages/interfaces around the internal Client-server and internal networking stack implementations in your library ( looks like it implements jetty for C-S connections on some protocol like http )
build a packages list on the lib's jar/archive to compare to your proguard config. pay special attention to interfaces being used by jetty's server implementation "jar -tf my.jar | sort | uniq" or some such
look at whats been obfuscated by proguard in 'mapping.txt' and in 'seeds.txt' explain here. intersect those packages names from those respective lists with packages & lists assembled above that you did NOT want proguard to mess with. 'seeds' should contain your jetty classes/interfaces. 'mapping' should NOT!
Maybe you could try to add -keepclassmembers in addition to -keep class for package org.fourthline.cling as this:
-keep class org.fourthline.cling.** { *;}
-keepclassmembers class org.fourthline.cling.** { *;}

How to make org.apache.http.legacy work with ProGuard (azure mobile services)?

The problem:
I'm using android mobile services, which relies on androidhttpclient.
Referencing org.apache.http.legacy resolves all the problems and the app runs just fine. However, with proguard on, I keep running into issues.
The problem plays out in two scenarios. If I keep the export checkbox checked (in jave build path), I get a 'Stub!' exception as expected (see discussion below)(see screenshot for which checkbox I'm talking about)
The runtime crash of type: "Stub!":
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.stuffd/com.stuffd.MainActivity}: java.lang.RuntimeException: Stub!
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2345)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405)
at android.app.ActivityThread.access$800(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1324)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5317)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
Caused by: java.lang.RuntimeException: Stub!
at org.apache.http.message.AbstractHttpMessage.(AbstractHttpMessage.java:7)
at org.apache.http.client.methods.HttpRequestBase.(HttpRequestBase.java:7)
at org.apache.http.client.methods.HttpGet.(HttpGet.java:8)
at com.microsoft.windowsazure.mobileservices.table.MobileServiceJsonTable.executeGetRecords(MobileServiceJsonTable.java:952)
at com.microsoft.windowsazure.mobileservices.table.MobileServiceJsonTable.executeUrlQuery(MobileServiceJsonTable.java:183)
at com.microsoft.windowsazure.mobileservices.table.MobileServiceJsonTable.execute(MobileServiceJsonTable.java:160)
at com.microsoft.windowsazure.mobileservices.table.MobileServiceTable.execute(MobileServiceTable.java:158)
at com.microsoft.windowsazure.mobileservices.table.MobileServiceTable.execute(MobileServiceTable.java:249)
at com.microsoft.windowsazure.mobileservices.table.query.ExecutableQuery.execute(ExecutableQuery.java:101)
If however, I keep the checkbox unchecked (as suggested - see discussion below), I get and AbstractMethodError exception.
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:811)
Caused by: java.lang.AbstractMethodError: abstract method "java.lang.String org.apache.http.client.methods.HttpRequestBase.getMethod()"
at android.net.http.AndroidHttpClient.getMethod(AndroidHttpClient.java:283)
at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:301)
proguard config used:
-dontwarn org.apache.http.**
-dontwarn android.net.http.**
-dontwarn com.microsoft.windowsazure.mobileservices.**
Has anyone else run into this and has figured it out?
Here's what I am using, allowing the OS to properly replace the stubbed methods at runtime.
-keep class org.apache.http.** { *; }
-keep class org.apache.commons.codec.** { *; }
-keep class org.apache.commons.logging.** { *; }
-keep class android.net.compatibility.** { *; }
-keep class android.net.http.** { *; }
-dontwarn org.apache.http.**
-dontwarn android.webkit.**
It's all the stubbed packages provided by org.apache.http.legacy.jar.
You're right not exporting the legacy apache lib. However it has to be located outside the libs folder and added to the Build Path (when using Eclipse). Otherwise it gets exported anyway with your Android Private Libraries.
I'm using GMS, Volley and AndroidHttpClient in my own communication classes.
Here's what I had to add to the proguard settings:
-dontwarn org.apache.http.**
-dontwarn com.google.android.gms.**
-dontwarn com.android.volley.toolbox.**
-dontwarn com.myapp.communication.**
-keep class com.google.android.gms.** { *; }

When using Proguard, do you need a separate config for each referenced library?

My application has references to HoloEverywhere and SherlockActionBar, both which are in-workspace projects. When I enabled Proguard for the application only, it crashes giving these errors:
11-15 11:50:11.090: E/AndroidRuntime(24823): Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: <init> [class android.app.Activity, int]
11-15 11:50:11.090: E/AndroidRuntime(24823): at com.actionbarsherlock.a.a(Unknown Source)
11-15 11:50:11.090: E/AndroidRuntime(24823): at org.holoeverywhere.a.a.l(Unknown Source)
11-15 11:50:11.090: E/AndroidRuntime(24823): at org.holoeverywhere.a.a.setContentView(Unknown Source)
Is this because I only enabled Proguard for the app and not the other in-workspace projects HE and ABS?
I am using the default proguard-project.txt in the sdk and did not add any additional rules.
No you do not.
Use these rules to keep the referenced classes un-obfuscated.
-keep class com.actionbarsherlock.** {*;}
-keep class org.holoeverywhere.** {*;}
this also will help
## ActionBarSherlock 4.4.0 specific rules ##
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
-keepattributes *Annotation*
## hack for Actionbarsherlock 4.4.0, see https://github.com/JakeWharton/ActionBarSherlock/issues/1001 ##
-dontwarn com.actionbarsherlock.internal.**

GoogleAnalyticsV2 and Proguard

I use Google Analytics V2 library in my project.
When I export signed application package from Eclipse I get following output in Console:
Proguard returned with error code 1. See console
Warning: com.google.analytics.tracking.android.FutureApis: can't find referenced method 'boolean setReadable(boolean,boolean)' in class java.io.File
Warning: com.google.analytics.tracking.android.FutureApis: can't find referenced method 'boolean setWritable(boolean,boolean)' in class java.io.File
You should check if you need to specify additional program jars.
Warning: there were 2 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile them and try again.
Alternatively, you may have to specify the option
'-dontskipnonpubliclibraryclassmembers'.
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:321)
at proguard.ProGuard.initialize(ProGuard.java:211)
at proguard.ProGuard.execute(ProGuard.java:86)
at proguard.ProGuard.main(ProGuard.java:492)
Here's my proguard.cfg
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-dontwarn android.support.**
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class com.android.vending.licensing.ILicensingService
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
-keep class com.flurry.** { *; }
-dontwarn com.flurry.**
If I add -dontwarn com.google.analytics.tracking.android.FutureApis to config then I get
at proguard.ProGuard.main(ProGuard.java:492)
Proguard returned with error code 1. See console
You should check if you need to specify additional program jars.
Unexpected error while evaluating instruction:
Class = [android/support/v4/view/AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl]
Method = [newAccessiblityDelegateBridge(Landroid/support/v4/view/AccessibilityDelegateCompat;)Ljava/lang/Object;]
Instruction = [18] areturn
Exception = [java.lang.IllegalArgumentException] (Can't find any super classes of [android/support/v4/view/AccessibilityDelegateCompatIcs$1] (not even immediate super class [android/view/View$AccessibilityDelegate]))
Unexpected error while performing partial evaluation:
Class = [android/support/v4/view/AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl]
Method = [newAccessiblityDelegateBridge(Landroid/support/v4/view/AccessibilityDelegateCompat;)Ljava/lang/Object;]
Exception = [java.lang.IllegalArgumentException] (Can't find any super classes of [android/support/v4/view/AccessibilityDelegateCompatIcs$1] (not even immediate super class [android/view/View$AccessibilityDelegate]))
java.lang.IllegalArgumentException: Can't find any super classes of [android/support/v4/view/AccessibilityDelegateCompatIcs$1] (not even immediate super class [android/view/View$AccessibilityDelegate])
at proguard.evaluation.value.ReferenceValue.generalize(ReferenceValue.java:287)
at proguard.evaluation.value.IdentifiedReferenceValue.generalize(IdentifiedReferenceValue.java:65)
at proguard.evaluation.value.ReferenceValue.generalize(ReferenceValue.java:481)
at proguard.optimize.info.MethodOptimizationInfo.generalizeReturnValue(MethodOptimizationInfo.java:247)
at proguard.optimize.evaluation.StoringInvocationUnit.generalizeMethodReturnValue(StoringInvocationUnit.java:195)
at proguard.optimize.evaluation.StoringInvocationUnit.setMethodReturnValue(StoringInvocationUnit.java:126)
at proguard.evaluation.BasicInvocationUnit.exitMethod(BasicInvocationUnit.java:134)
at proguard.evaluation.Processor.visitSimpleInstruction(Processor.java:514)
at proguard.classfile.instruction.SimpleInstruction.accept(SimpleInstruction.java:218)
at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:753)
at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:587)
at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:560)
at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute0(PartialEvaluator.java:264)
at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute(PartialEvaluator.java:181)
at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:79)
at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:95)
at proguard.classfile.util.SimplifiedVisitor.visitProgramMethod(SimplifiedVisitor.java:91)
at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:71)
at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:504)
at proguard.classfile.visitor.AllMethodVisitor.visitProgramClass(AllMethodVisitor.java:47)
at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
at proguard.classfile.ClassPool.classesAccept(ClassPool.java:116)
at proguard.optimize.Optimizer.execute(Optimizer.java:372)
at proguard.ProGuard.optimize(ProGuard.java:306)
at proguard.ProGuard.execute(ProGuard.java:115)
at proguard.ProGuard.main(ProGuard.java:492)
Any hints?
I've also faced this problem. As there's no official solution in the GA documentation yet, I made up this set of rules:
-keep class com.google.android.gms.analytics.**
-keep class com.google.analytics.tracking.**
-dontwarn com.google.android.gms.analytics.**
-dontwarn com.google.analytics.tracking.**
This skips obfuscation as well, but that should not be a problem for an external libary..
The initial warning indicates that FutureApis invokes File#setReadable(boolean,boolean), which doesn't exist on the target platform that you have specified for your build (apparently android-8 or older). ProGuard can ignore it, but it will be a problem if that code is ever executed on those older platforms. The documentation of Google Analytics specifies that android-7 is sufficient, so presumably ignoring it is fine.
The unexpected error indicates that V4 support class AccessibilityDelegateCompatIcs$1 extends Android class View$AccessibilityDelegate, which doesn't exist on the target platform that you have specified for your build (android-13 or older). In this case, ProGuard really needs that class to properly process the code. With an incomplete class hierarchy, the output would be a mess.
You can solve both problems by specifying a more recent build target in project.properties when compiling your release version. The missing classes and methods will be present in the corresponding android.jar, so ProGuard will have all the information it needs. Since these classes are just runtime library classes, used for compilation/optimization/obfuscation, they won't affect the output.
I ran into the same problem - I was able to suppress errors when creating ank for release - but when the application it falls, in those places where the classes to which swearing obfuscator. At the moment I have not solved this problem. What is interesting is that in debage mode when running the application through Eclipse - and it works perfectly.

Categories

Resources