I am just done with a small android app in which i need to use pro-guard for obfuscating any private keys. I have enabled pro-guard in project (IDE Eclipse) but while exporting, its giving me following errors (just pasting few of them):
[2014-09-13 15:12:05 - ABC] Proguard returned with error code 1. See console
[2014-09-13 15:12:05 - ABC] Warning: org.apache.harmony.awt.datatransfer.DataProxy: can't find superclass or interface java.awt.datatransfer. Transferable
[2014-09-13 15:12:05 - ABC] Warning: au.com.bytecode.opencsv.bean.CsvToBean: can't find referenced class java.beans.PropertyEditor
[2014-09-13 15:12:05 - ABC] Warning: au.com.bytecode.opencsv.bean.CsvToBean: can't find referenced class java.beans.PropertyEditor
[2014-09-13 15:12:05 - ABC] Warning: au.com.bytecode.opencsv.bean.MappingStrategy: can't find referenced class java.beans.IntrospectionException
[2014-09-13 15:12:05 - ABC] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslException
[2014-09-13 15:12:05 - ABC] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2014-09-13 15:12:05 - ABC] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2014-09-13 15:12:05 - ABC] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.DataFlavor
[2014-09-13 15:12:05 - ABC] Warning: org.apache.harmony.awt.datatransfer.DataSnapshot: can't find referenced class java.awt.datatransfer.DataFlavor
[2014-09-13 15:12:05 - ABC] Warning: org.apache.harmony.awt.datatransfer.DragSourceEventProxy: can't find referenced class java.awt.Point
[2014-09-13 15:12:05 - Remembrall] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2014-09-13 15:12:05 - Remembrall] You should check if you need to specify additional program jars.
[2014-09-13 15:12:05 - Remembrall] Warning: there were 286 unresolved references to classes or interfaces.
[2014-09-13 15:12:05 - Remembrall] You may need to specify additional library jars (using '-libraryjars').
[2014-09-13 15:12:05 - Remembrall] Error: Please correct the above warnings first.
[2014-09-13 15:12:06 - Remembrall] WARNING: Found both android-support-v4 and android-support-v13 in the dependency list.
[2014-09-13 15:12:06 - Remembrall] Because v13 includes v4, using only v13.
[2014-09-13 15:12:07 - Remembrall] WARNING: Found both android-support-v4 and android-support-v13 in the dependency list.
[2014-09-13 15:12:07 - Remembrall] Because v13 includes v4, using only v13.
[2014-09-13 15:12:18 - Remembrall] WARNING: Found both android-support-v4 and android-support-v13 in the dependency list.
[2014-09-13 15:12:18 - Remembrall] Because v13 includes v4, using only v13.
[2014-09-13 15:12:18 - Remembrall] WARNING: Found both android-support-v4 and android-support-v13 in the dependency list.
[2014-09-13 15:12:18 - Remembrall] Because v13 includes v4, using only v13.
Add these lines to proguard config file (proguard-android.txt)
-keep class android.support.v4.** { *; }
-dontwarn android.support.v4.**
-dontwarn javax.activation.**
-dontwarn javax.security.**
-dontwarn java.awt.**
-libraryjars <java.home>/lib/rt.jar
-keep class javax.** {*;}
-keep class com.sun.** {*;}
-keep class myjava.** {*;}
-keep class org.apache.harmony.** {*;}
-keep public class Mail {*;}
-dontshrink
I don't know the OpenCSV library, but it looks like it was designed for standard Java. Android Java is the same programming language, but not the same runtime environment. I see references to java.awt.datatransfer.Transferable and java.beans.PropertyEditor in your error message. These classes don't exist on Android (full package list here). No amount of Proguard config is going to add them. You'll have to use a different CSV processing library, or at least, strip out and work around the parts of OpenCSV you can't use.
Related
I use Azure mobile app in my new Android project.
When I run the app on debug mode, the Mobile app works successfully and I can see my new records in my table.
My problem is starting when I creates an apk file with proguard.
I am sorry to say that I am newbie on Proguard then I can not solve my Proguard problems even I read the documentation at offical Proguard page.
So, I get these errors when I try to create apk file with Proguard without any Proguard code.
Warning: com.google.common.base.Absent: can't find referenced class javax.annotation.Nullable
Warning: com.google.common.base.Absent: can't find referenced class javax.annotation.Nullable
Warning: com.google.common.base.Ascii: can't find referenced class javax.annotation.CheckReturnValue
Warning: com.google.common.base.CaseFormat$StringConverter: can't find referenced class javax.annotation.Nullable
Warning: com.google.common.base.CharMatcher: can't find referenced class javax.annotation.CheckReturnValue
Warning: com.google.common.base.CharMatcher: can't find referenced class javax.annotation.CheckReturnValue
Warning: com.google.common.base.CharMatcher: can't find referenced class javax.annotation.CheckReturnValue
and more hundreads line...
Warning: com.google.common.cache.Striped64: can't find referenced class sun.misc.Unsafe
Warning: com.google.common.cache.Striped64: can't find referenced class sun.misc.Unsafe
Warning: com.google.common.cache.Striped64: can't find referenced class sun.misc.Unsafe
Warning: com.google.common.cache.Striped64: can't find referenced class sun.misc.Unsafe
Warning: com.google.common.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
Warning: com.google.common.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
Warning: com.google.common.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
Warning: com.google.common.cache.Striped64$1: can't find referenced class sun.misc.Unsafe
and more hundreads line....
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Files
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class java.nio.file.Path
Warning: okio.Okio: can't find referenced class java.nio.file.OpenOption
Warning: okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Then I added these line in my proguard.
-keep class okio.** { *; }
-dontwarn okio.**
-keep class com.fasterxml.** { *; }
-dontwarn com.fasterxml.**
-dontwarn javax.annotation.**
-dontwarn javax.inject.**
-dontwarn sun.misc.Unsafe
-keep class com.microsoft.windowsazure.mobileservices.** { *; }
-dontwarn android.os.**
-dontwarn com.microsoft.windowsazure.mobileservices.RequestAsyncTask
After that, Android studio created the apk however The app crahsed as soon as It started. Then I investigate the logs, I saw new warnings that color are white.
Note: duplicate definition of library class [org.apache.http.conn.scheme.LayeredSocketFactory]
Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory]
Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver]
Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException]
Note: duplicate definition of library class [org.apache.http.params.CoreConnectionPNames]
Note: duplicate definition of library class [org.apache.http.params.HttpParams]
Note: duplicate definition of library class [org.apache.http.params.HttpConnectionParams]
Note: duplicate definition of library class [android.net.http.SslError]
Note: duplicate definition of library class [android.net.http.HttpResponseCache]
Note: duplicate definition of library class [android.net.http.SslCertificate$DName]
Note: duplicate definition of library class [android.net.http.SslCertificate]
Note: there were 11 duplicate class definitions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Thanks for help.
#MustafaOlkun, It seems that the solutions for your issues can be found at the troubleshooting page of ProGuard.
For the issue Warning: can't find referenced class, please see http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass.
For the issue Note: duplicate definition of library class, please see http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass.
Hope it helps.
Title says it all. Does anyone have the ProGuard settings to use for Kamcord v1.7 or v1.9? I am hitting so many warnings I have several left and I am not certain how to exempt Kamcord's references from the ProGuard process.
I can turn off proguard and and and can deploy.
Here is the warning I think matter...
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.Cache
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkHttpClient
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkUrlFactory
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.Cache
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkHttpClient
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkHttpClient
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkUrlFactory
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkUrlFactory
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkUrlFactory
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkUrlFactory
[proguard] Warning: com.c.a.KC_s: can't find referenced class com.squareup.okhttp.OkHttpClient
The last bit of the ANT build (using proguard)
[proguard] Note: there were 7 references to unknown classes.
[proguard] You should check your configuration for typos.
[proguard] Note: there were 60 unkept descriptor classes in kept class members.
[proguard] You should consider explicitly keeping the mentioned classes
[proguard] (using '-keep').
[proguard] Note: there were 14 unresolved dynamic references to classes or interfaces.
[proguard] You should check if you need to specify additional program jars.
[proguard] Warning: there were 11 unresolved references to classes or interfaces.
[proguard] You may need to specify additional library jars (using '-libraryjars').
BUILD FAILED
Here is the settings that have got me this far in my proguard-project.txt...
#kamcord (best guesses)
-keep class com.kamcord.** { *; }
-keep class com.c.** { *; }
-keep class com.a.** { *; }
-keep class a.** { *; }
-keep class com.googlecode.mp4parser.** { *; }
-keep class com.coremedia.** { *; }
-keep class com.squareup.** { *; }
-keep class libcore.icu.** { *; }
-dontwarn com.kamcord.**
There is a metric ton of additional ProGuard config happening prior to this... So maybe some ProGuard experts might be able to clue me on on what's missing in the question to make it answerable.
gradle 1.10 on linux on CLI
./gradlew clean
./gradlew assembleRelease
ERROR in stdout...
Note: there were 2 references to unknown classes.
You should check your configuration for typos.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Note: there were 5 unresolved dynamic references to classes or interfaces.
You should check if you need to specify additional program jars.
(http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)
Warning: there were 106 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
:proguardRelease FAILED
:proguardRelease (Thread[main,5,main]) completed. Took 4.689 secs.
FAILURE: Build failed with an exception.
I extend an oss package bundled with gradle for release builds ( added jackson.json but not from maven central ).
For some reason, proguard is throwing hundreds of 'org.joda.time... class not found' errors despite the following snips:
release {
runProguard true
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
} // in 'build.gradle'
-dontwarn android.support.**
-dontwarn org.joda.time.**
-dontwarn org.codehaus.jackson.**
-dontwarn ch.boye.httpclientandroidlib.**
-dontwarn org.apache.http.**
-dontwarn android.**
-dontwarn java.**
-dontwarn com.google.sample.castcompanionlibrary.**
-dontwarn org.w3c.dom.**
-dontwarn com.google.android.gms.maps.**
#rcr adds
-libraryjars /usr/local/src/android-sdk-linux/platforms/android-19/android.jar
-libraryjars <java.home>/lib/rt.jar
-libraryjars libs/jackson-core-lgpl-1.9.2.jar
-libraryjars libs/jackson-mapper-lgpl-1.9.2.jar
-libraryjars libs/Parse-1.1.3.jar
-libraryjars libs/httpclient-1.1.jar
stdout DETAIL from './gradlew assembleRelease' below:
Initializing...
Note: the configuration refers to the unknown class 'com.google.vending.licensing.ILicensingService'
Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService'
Note: the configuration refers to the unknown class 'Object'
Maybe you meant the fully qualified name 'java.lang.Object'?
Warning: org.codehaus.jackson.map.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: org.codehaus.jackson.map.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: org.codehaus.jackson.map.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: org.codehaus.jackson.map.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: org.codehaus.jackson.map.ext.JodaDeserializers: can't find referenced class org.joda.time.DateTime
Warning: org.codehaus.jackson.map.ext.JodaDeserializers: can't find referenced class org.joda.time.ReadableDateTime
Warning: org.codehaus.jackson.map.ext.JodaDeserializers: can't find referenced class org.joda.time.ReadableInstant
Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateTime
Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateTime
Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateTime
Warning: org.codehaus.jackson.map.ext.JodaDeserializers$DateMidnightDeserializer: can't find referenced class org.joda.time.DateMidnight
Warn
... 100s more in 'org.joda.time.**'
Note: android.support.v4.text.ICUCompatIcs: can't find dynamically referenced class libcore.icu.ICU
Note: com.google.android.gms.maps.internal.q: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImplGmm6
Note: com.google.android.gms.maps.internal.q: can't find dynamically referenced class com.google.android.gms.maps.internal.CreatorImpl
Note: org.codehaus.jackson.map.deser.BasicDeserializerFactory: can't find dynamically referenced class java.util.ConcurrentNavigableMap
Note: org.codehaus.jackson.map.deser.BasicDeserializerFactory: can't find dynamically referenced class java.util.ConcurrentSkipListM
The -dontwarn proguard configs for 'org.joda.**' dont seem to work..
I have "-dontnote **ILicensingService" in config and that does not appear to work.
The -dontwarn config for com.google.android.gms.** not working
The -dontwarn for java.util.** not working
In what file is your "snippet" with the -dontwarn flags? It doesn't look like you're ever telling your build.gradle file about that proguard configuration.
You have:
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
But you should also have:
proguardFile 'your_proguard_config.cfg'
so that it will use both the default android configuration and your configuration.
I am doing first-time Proguard setting on My Android Project and Exporting My APK File but I got Following errors:
(I also not found any proguard.cfg file in my project root)
[2013-08-01 10:54:42 - SalesmanTracker] Note: there were 2 duplicate class definitions.
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.google.common.collect.MinMaxPriorityQueue: can't find referenced field 'int UNSET_EXPECTED_SIZE' in class com.google.common.collect.MinMaxPriorityQueue$Builder
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator: can't find referenced class sun.misc.Unsafe
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator: can't find referenced class sun.misc.Unsafe
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator: can't find referenced class sun.misc.Unsafe
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator: can't find referenced class sun.misc.Unsafe
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator: can't find referenced class sun.misc.Unsafe
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1: can't find referenced class sun.misc.Unsafe
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.salesman.activities.PlacesMapActivity: can't find referenced class com.google.android.maps.GeoPoint
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.salesman.activities.PlacesMapActivity: can't find referenced class com.google.android.maps.MapController
[2013-08-01 10:54:42 - SalesmanTracker] Warning: com.salesman.activities.PlacesMapActivity: can't find referenced class com.google.android.maps.OverlayItem
[2013-08-01 10:54:42 - SalesmanTracker] You should check if you need to specify additional program jars.
[2013-08-01 10:54:42 - SalesmanTracker] Warning: there were 9 unresolved references to classes or interfaces.
[2013-08-01 10:54:42 - SalesmanTracker] You may need to specify additional library jars (using '-libraryjars').
[2013-08-01 10:54:42 - SalesmanTracker] Warning: there were 1 unresolved references to program class members.
[2013-08-01 10:54:42 - SalesmanTracker] Your input classes appear to be inconsistent.
[2013-08-01 10:54:42 - SalesmanTracker] You may need to recompile them and try again.
[2013-08-01 10:54:42 - SalesmanTracker] Alternatively, you may have to specify the option
[2013-08-01 10:54:42 - SalesmanTracker] '-dontskipnonpubliclibraryclassmembers'.
[2013-08-01 10:54:42 - SalesmanTracker] java.io.IOException: Please correct the above warnings first.
[2013-08-01 10:54:42 - SalesmanTracker] at proguard.Initializer.execute(Initializer.java:321)
[2013-08-01 10:54:42 - SalesmanTracker] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-08-01 10:54:42 - SalesmanTracker] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-08-01 10:54:42 - SalesmanTracker] at proguard.ProGuard.main(ProGuard.java:492)
**project.properties : **
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=proguard.cfg
# Project target.
target=android-17
android.library.reference.1=..\\librarySlideMenu
android.library.reference.2=../google-play-services_lib
Please tell me about the solution to that and how to do exactly the setting of proguard.
Thanks in Advance.
Finally I Got Answer with the help of this Tutorial
I have changed following things:
In project.properties:
Uncomment or add this line:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
Now I have used Google Library so my proguard.project.txt will be like:
Here add your libraries which you have used in your project:
-libraryjars /libs/google-api-client-1.10.3-beta.jar
-libraryjars /libs/google-api-client-android2-1.10.3-beta.jar
-libraryjars /libs/google-http-client-1.10.3-beta.jar
-libraryjars /libs/google-http-client-android2-1.10.3-beta.jar
-libraryjars /libs/google-oauth-client-1.10.1-beta.jar
-libraryjars /libs/gson-2.1.jar
-libraryjars /libs/guava-11.0.1.jar
-libraryjars /libs/jackson-core-asl-1.9.4.jar
-libraryjars /libs/jsr305-1.3.9.jar
-libraryjars /libs/protobuf-java-2.2.0.jar
-libraryjars /libs/maps.jar
Add any project specific keep options here:
-keep class com.google.**
-dontwarn com.google.**
Then you can Export your APK using following steps:
Right click on project
select Export
Follow Steps
If you have any Query then you are free to ping me :)
Thank you.
Using Maven in my case, google-api-client brought guava-jdk5 as a dependency, causing similar problems.
Guava wiki page on Proguard suggests:
https://code.google.com/p/guava-libraries/wiki/UsingProGuardWithGuava
-dontwarn sun.misc.Unsafe
-dontwarn com.google.common.collect.MinMaxPriorityQueue
Add these line in your proguard-project.txt
-keep public class com.google.common.**
-keep public class * extends android.app.Activity
I am using the gmailsender to send email in my app. I followed the link below Sending Email in Android using JavaMail API without using the default/built-in app
I have however noticed that whenever I use proguard to build my APK, then the gmail sender does not work(when I install that APK). There is no error thrown, but emails are not sent. If I disable proguard and then generate the APK, then it works fine using that APK.
Can anyone please suggest what might be wrong here.
:::EDIT:::-ADDED FEW ERROR MESAGE(abridged) LINES FROM CONSOLE WHILE GENERATING APK. I COULD GET RID OF THOSE WARNING HOWEVER BY IGNORING THEM IN PROGUARD CONFIG FILE
[2013-07-09 10:00:38 - ] Proguard returned with error code 1. See console
[2013-07-09 10:00:38 - ] Warning: org.apache.harmony.awt.datatransfer.DataProxy: can't find superclass or interface java.awt.datatransfer.Transferable
[2013-07-09 10:00:38 - ] Warning: org.apache.harmony.awt.datatransfer.NativeClipboard: can't find superclass or interface java.awt.datatransfer.Clipboard
[2013-07-09 10:00:38 - ] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.Sasl
[2013-07-09 10:00:38 - ] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.Sasl
[2013-07-09 10:00:38 - ] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find referenced class javax.security.sasl.SaslClient
[2013-07-09 10:00:38 - ] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator: can't find
[2013-07-09 10:00:38 - ] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.auth.callback.NameCallback
[2013-07-09 10:00:38 - ] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmCallback
[2013-07-09 10:00:38 - ] Warning: com.sun.mail.imap.protocol.IMAPSaslAuthenticator$1: can't find referenced class javax.security.sasl.RealmChoiceCallback
[2013-07-09 10:00:38 - ] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2013-07-09 10:00:38 - ] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2013-07-09 10:00:38 - ] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-07-09 10:00:38 - ] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-07-09 10:00:38 - ] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-07-09 10:00:38 - ] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-07-09 10:00:38 - ] You should check if you need to specify additional program jars.
[2013-07-09 10:00:38 - ] Warning: there were 247 unresolved references to classes or interfaces.
[2013-07-09 10:00:38 - ] You may need to specify additional library jars (using '-libraryjars').
[2013-07-09 10:00:38 - ] java.io.IOException: Please correct the above warnings first.
[2013-07-09 10:00:38 - ] at proguard.Initializer.execute(Initializer.java:321)
[2013-07-09 10:00:38 - ] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-07-09 10:00:38 - ] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-07-09 10:00:38 - ] at proguard.ProGuard.main(ProGuard.java:49
Finally solved the problem by updating to latest version of proguard from 4.7 to 4.9.
also added the following to the proguard config file
-dontwarn java.awt.**
-dontwarn java.beans.Beans
-dontwarn javax.security.**
-keep class javamail.** {*;}
-keep class javax.mail.** {*;}
-keep class javax.activation.** {*;}
-keep class com.sun.mail.dsn.** {*;}
-keep class com.sun.mail.handlers.** {*;}
-keep class com.sun.mail.smtp.** {*;}
-keep class com.sun.mail.util.** {*;}
-keep class mailcap.** {*;}
-keep class mimetypes.** {*;}
-keep class myjava.awt.datatransfer.** {*;}
-keep class org.apache.harmony.awt.** {*;}
-keep class org.apache.harmony.misc.** {*;}