I use joda-time.jar in my app, and when exporting signed apk proguard saying something like (it is pretty common problem as I can see, when I look over internet):
[2014-01-07 12:44:53 - XYZ] Proguard returned with error code 1. See console
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.DateMidnight: can't find referenced class org.joda.convert.FromString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.DateTime: can't find referenced class org.joda.convert.FromString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.Days: can't find referenced class org.joda.convert.FromString
...
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.Years: can't find referenced class org.joda.convert.FromString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.Years: can't find referenced class org.joda.convert.ToString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.base.AbstractDuration: can't find referenced class org.joda.convert.ToString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.base.AbstractInstant: can't find referenced class org.joda.convert.ToString
[2014-01-07 12:44:53 - XYZ] Warning: org.joda.time.base.AbstractPeriod: can't find referenced class org.joda.convert.ToString
[2014-01-07 12:44:53 - XYZ] You should check if you need to specify additional program jars.
[2014-01-07 12:44:53 - XYZ] Warning: there were 37 unresolved references to classes or interfaces.
[2014-01-07 12:44:53 - XYZ] You may need to specify additional library jars (using '-libraryjars').
[2014-01-07 12:44:53 - XYZ] java.io.IOException: Please correct the above warnings first.
[2014-01-07 12:44:53 - XYZ] at proguard.Initializer.execute(Initializer.java:321)
[2014-01-07 12:44:53 - XYZ] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-01-07 12:44:53 - XYZ] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-01-07 12:44:53 - XYZ] at proguard.ProGuard.main(ProGuard.java:492)
Everywhere in forums or also here (Android - Proguard didn't compile with Joda Time jar file) they say solution should be downloading joda-convert.jar, adding to buildpath. But for me it just DOESN'T WORK, after I did it, proguard again says something similar:
[2014-01-07 12:41:39 - XYZ] Proguard returned with error code 1. See console
[2014-01-07 12:41:39 - XYZ] Warning: org.joda.convert.JDKStringConverter$9: can't find referenced class javax.xml.bind.DatatypeConverter
[2014-01-07 12:41:39 - XYZ] Warning: org.joda.convert.JDKStringConverter$9: can't find referenced class javax.xml.bind.DatatypeConverter
[2014-01-07 12:41:39 - XYZ] Warning: org.joda.convert.JDKStringConverter$9: can't find referenced class javax.xml.bind.DatatypeConverter
[2014-01-07 12:41:39 - XYZ] You should check if you need to specify additional program jars.
[2014-01-07 12:41:39 - XYZ] Warning: there were 3 unresolved references to classes or interfaces.
[2014-01-07 12:41:39 - XYZ] You may need to specify additional library jars (using '-libraryjars').
[2014-01-07 12:41:39 - XYZ] java.io.IOException: Please correct the above warnings first.
[2014-01-07 12:41:39 - XYZ] at proguard.Initializer.execute(Initializer.java:321)
[2014-01-07 12:41:39 - XYZ] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-01-07 12:41:39 - XYZ] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-01-07 12:41:39 - XYZ] at proguard.ProGuard.main(ProGuard.java:492)
How to fix this issue? I spend few hours of trying everything, but I just can't find it out...Many thanks!
Ok I figured it out. Actually adding joda-convert.jar to build path works, but only for older version (1.4 and lower, if you download latest one - 1.5 joda-convert.jar, it doesn't work)...
Related
I'm exporting android application (in Eclipse) and get the following error:
[2016-07-31 09:21:57 - EnglishPhonics] Proguard returned with error code 1. See console
[2016-07-31 09:21:57 - EnglishPhonics] Warning: com.google.android.gms.internal.zzig: can't find referenced class android.security.NetworkSecurityPolicy
[2016-07-31 09:21:57 - EnglishPhonics] Warning: com.google.android.gms.internal.zzig: can't find referenced class android.security.NetworkSecurityPolicy
[2016-07-31 09:21:57 - EnglishPhonics] Warning: com.google.android.gms.internal.zzig: can't find referenced class android.security.NetworkSecurityPolicy
[2016-07-31 09:21:57 - EnglishPhonics] You should check if you need to specify additional program jars.
[2016-07-31 09:21:57 - EnglishPhonics] Warning: there were 3 unresolved references to classes or interfaces.
[2016-07-31 09:21:57 - EnglishPhonics] You may need to specify additional library jars (using '-libraryjars').
[2016-07-31 09:21:57 - EnglishPhonics] java.io.IOException: Please correct the above warnings first.
[2016-07-31 09:21:57 - EnglishPhonics] at proguard.Initializer.execute(Initializer.java:321)
[2016-07-31 09:21:57 - EnglishPhonics] at proguard.ProGuard.initialize(ProGuard.java:211)
[2016-07-31 09:21:57 - EnglishPhonics] at proguard.ProGuard.execute(ProGuard.java:86)
[2016-07-31 09:21:57 - EnglishPhonics] at proguard.ProGuard.main(ProGuard.java:492)
I'm using Google Billing service with lastest version. Does anyone know how to solve this problem?
I am trying to built the signed apk of my app. But i am getting the error pop up as
Proguard returned with error code 1. See console
And error log in console as :
[2016-04-15 11:36:44 - MyApp] Proguard returned with error code 1. See console
[2016-04-15 11:36:44 - MyApp] Note: there were 85 duplicate class definitions.
[2016-04-15 11:36:44 - MyApp] Warning: org.acra.ErrorReporter: can't find referenced method 'void setLatestEventInfo(android.content.Context,java.lang.CharSequence,java.lang.CharSequence,android.app.PendingIntent)' in class android.app.Notification
[2016-04-15 11:36:44 - MyApp] You should check if you need to specify additional program jars.
[2016-04-15 11:36:44 - MyApp] Warning: there were 1 unresolved references to program class members.
[2016-04-15 11:36:44 - MyApp] Your input classes appear to be inconsistent.
[2016-04-15 11:36:44 - MyApp] You may need to recompile them and try again.
[2016-04-15 11:36:44 - MyApp] Alternatively, you may have to specify the option
[2016-04-15 11:36:44 - MyApp] '-dontskipnonpubliclibraryclassmembers'.
[2016-04-15 11:36:44 - MyApp] java.io.IOException: Please correct the above warnings first.
[2016-04-15 11:36:44 - MyApp] at proguard.Initializer.execute(Initializer.java:321)
[2016-04-15 11:36:44 - MyApp] at proguard.ProGuard.initialize(ProGuard.java:211)
[2016-04-15 11:36:44 - MyApp] at proguard.ProGuard.execute(ProGuard.java:86)
[2016-04-15 11:36:44 - MyApp] at proguard.ProGuard.main(ProGuard.java:492)
I am not able to understand what is the issue. For last version it works fine. I just provide support to Marsh Mellow in this version.
Please suggest me what changes or steps to perform to built signed apk with out Proguard error.
Try to add this to Proguard configuration file:
-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**
-dontwarn android.net.**
I am trying to protect my code by applying proguard in my code using eclipse i have used these libraries in my project inside libs folder
libs/AndroidViewAnimations-1.1.3.jar
libs/NineOldAndroid-2.4.0.jar
libs/universal-image-loader-1.9.2-with-sources.jar
libs/android-support-v4.jar
libs/AndroidEasingFunctions-1.0.0.jar
Here is my Project.properties content :
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-17
android.library.reference.1=..\\appcompat
android.library.reference.2=..\\google_play_services\\libproject\\google-play-services_lib
android.library.reference.3=../appcompat_v7
android.library.reference.4=../../adt-bundle-windows-x86_64-20140702/sdk/extras/google/google_play_services/libproject/google-play-services_lib
But i am failed to export APK i am getting following errors in console :
[2015-01-14 22:16:23 - MyGallery-master] Proguard returned with error code 1. See console
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.haarman.listviewanimations.BaseAdapterDecorator: can't find superclass or interface com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.haarman.listviewanimations.BaseAdapterDecorator: can't find referenced class com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.haarman.listviewanimations.BaseAdapterDecorator: can't find referenced class com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter
[2015-01-14 22:16:23 - MyGallery-master] Warning: com.haarman.listviewanimations.BaseAdapterDecorator: can't find referenced class com.emilsjolander.components.stickylistheaders.StickyListHeadersAdapter
[2015-01-14 22:16:23 - MyGallery-master] You should check if you need to specify additional program jars.
[2015-01-14 22:16:23 - MyGallery-master] Warning: there were 13 unresolved references to classes or interfaces.
[2015-01-14 22:16:23 - MyGallery-master] You may need to specify additional library jars (using '-libraryjars').
[2015-01-14 22:16:23 - MyGallery-master] java.io.IOException: Please correct the above warnings first.
[2015-01-14 22:16:23 - MyGallery-master] at proguard.Initializer.execute(Initializer.java:321)
[2015-01-14 22:16:23 - MyGallery-master] at proguard.ProGuard.initialize(ProGuard.java:211)
[2015-01-14 22:16:23 - MyGallery-master] at proguard.ProGuard.execute(ProGuard.java:86)
[2015-01-14 22:16:23 - MyGallery-master] at proguard.ProGuard.main(ProGuard.java:492)
[2015-01-14 22:25:13 - MyGallery-master] Proguard returned with error code 1. See console
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
[2015-01-14 22:25:13 - MyGallery-master] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
[2015-01-14 22:25:13 - MyGallery-master] You should check if you need to specify additional program jars.
[2015-01-14 22:25:13 - MyGallery-master] Warning: there were 9 unresolved references to classes or interfaces.
[2015-01-14 22:25:13 - MyGallery-master] You may need to specify additional library jars (using '-libraryjars').
[2015-01-14 22:25:13 - MyGallery-master] java.io.IOException: Please correct the above warnings first.
[2015-01-14 22:25:13 - MyGallery-master] at proguard.Initializer.execute(Initializer.java:321)
[2015-01-14 22:25:13 - MyGallery-master] at proguard.ProGuard.initialize(ProGuard.java:211)
[2015-01-14 22:25:13 - MyGallery-master] at proguard.ProGuard.execute(ProGuard.java:86)
[2015-01-14 22:25:13 - MyGallery-master] at proguard.ProGuard.main(ProGuard.java:492)
For the ListViewAnimations i added the following in my config file:-
-dontwarn com.nhaarman.listviewanimations.**
Try it and let me know
I'm experimenting problems to sign my app using ProGuard and the new AdMob library (Google Play Services Lib Project)
Console is giving me these errors:
[2014-04-26 16:41:33 - MyProject] Proguard returned with error code 1. See console
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.analytics.GoogleAnalytics$b: can't find superclass or interface android.app.Application$ActivityLifecycleCallbacks
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.ImageManager$e: can't find superclass or interface android.content.ComponentCallbacks2
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.analytics.GoogleAnalytics: can't find referenced class android.app.Application$ActivityLifecycleCallbacks
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.analytics.GoogleAnalytics: can't find referenced method 'void registerActivityLifecycleCallbacks(android.app.Application$ActivityLifecycleCallbacks)' in class android.app.Application
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.analytics.GoogleAnalytics$b: can't find referenced class android.app.Application$ActivityLifecycleCallbacks
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.ImageManager: can't find referenced method 'void registerComponentCallbacks(android.content.ComponentCallbacks)' in class android.content.Context
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.ImageManager$e: can't find referenced class android.content.ComponentCallbacks2
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.a: can't find referenced method 'android.graphics.drawable.Drawable[] getCompoundDrawablesRelative()' in class android.widget.TextView
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.common.images.a: can't find referenced method 'void setCompoundDrawablesRelativeWithIntrinsicBounds(android.graphics.drawable.Drawable,android.graphics.drawable.Drawable,android.graphics.drawable.Drawable,android.graphics.drawable.Drawable)' in class android.widget.TextView
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.internal.cx: can't find referenced method 'java.lang.String getDefaultUserAgent(android.content.Context)' in class android.webkit.WebSettings
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.internal.cx: can't find referenced method 'void setMediaPlaybackRequiresUserGesture(boolean)' in class android.webkit.WebSettings
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.internal.gd$b: can't find referenced method 'android.view.Display getDisplay()' in class android.view.View
[2014-04-26 16:41:33 - MyProject] Warning: com.google.android.gms.internal.gd$b: can't find referenced method 'void removeOnGlobalLayoutListener(android.view.ViewTreeObserver$OnGlobalLayoutListener)' in class android.view.ViewTreeObserver
[2014-04-26 16:41:33 - MyProject] You should check if you need to specify additional program jars.
[2014-04-26 16:41:33 - MyProject] Warning: there were 5 unresolved references to classes or interfaces.
[2014-04-26 16:41:33 - MyProject] You may need to specify additional library jars (using '-libraryjars').
[2014-04-26 16:41:33 - MyProject] Warning: there were 8 unresolved references to program class members.
[2014-04-26 16:41:33 - MyProject] Your input classes appear to be inconsistent.
[2014-04-26 16:41:33 - MyProject] You may need to recompile them and try again.
[2014-04-26 16:41:33 - MyProject] Alternatively, you may have to specify the option
[2014-04-26 16:41:33 - MyProject] '-dontskipnonpubliclibraryclassmembers'.
[2014-04-26 16:41:33 - MyProject] java.io.IOException: Please correct the above warnings first.
[2014-04-26 16:41:33 - MyProject] at proguard.Initializer.execute(Initializer.java:321)
[2014-04-26 16:41:33 - MyProject] at proguard.ProGuard.initialize(ProGuard.java:211)
[2014-04-26 16:41:33 - MyProject] at proguard.ProGuard.execute(ProGuard.java:86)
[2014-04-26 16:41:33 - MyProject] at proguard.ProGuard.main(ProGuard.java:492)
I can't find any way to solve this on internet.
maybe you should add this to your proguard.txt :
-dontwarn com.google.android.gms.**
good luck.
I stated using Google Drive API in my project.. Every thing works fine if i run the project on phone using the debug keystore.
when i try to create a signed APK, proguard throws me the following error
[2013-10-07 12:59:01 - My Project] Proguard returned with error code 1. See console
[2013-10-07 12:59:01 - My Project] Proguard returned with error code 1. See console
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.DataProxy: can't find superclass or interface java.awt.datatransfer.Transferable
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.NativeClipboard: can't find superclass or interface java.awt.datatransfer.Clipboard
[2013-10-07 12:59:01 - My Project] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2013-10-07 12:59:01 - My Project] Warning: javax.activation.CommandInfo: can't find referenced class java.beans.Beans
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.Toolkit
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.ContextStorage: can't find referenced class java.awt.GraphicsEnvironment
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.DTK: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.SystemFlavorMap
[2013-10-07 12:59:01 - My Project] Warning: org.apache.harmony.awt.datatransfer.TextFlavor: can't find referenced class java.awt.datatransfer.DataFlavor
[2013-10-07 12:59:01 - My Project] You should check if you need to specify additional program jars.
[2013-10-07 12:59:01 - My Project] Warning: there were 224 unresolved references to classes or interfaces.
[2013-10-07 12:59:01 - My Project] You may need to specify additional library jars (using '-libraryjars').
[2013-10-07 12:59:01 - My Project] java.io.IOException: Please correct the above warnings first.
[2013-10-07 12:59:01 - My Project] at proguard.Initializer.execute(Initializer.java:321)
[2013-10-07 12:59:01 - My Project] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-10-07 12:59:01 - My Project] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-10-07 12:59:01 - My Project] at proguard.ProGuard.main(ProGuard.java:492)
I also tried adding the following into proguard-project.txt
-dontwarn org.apache.harmony.**
-dontwarn javax.activation.**
If I add the above, APK is created, but the APP crashes on launch
can anyone please help me!
You're referencing classes that aren't part of the Android runtime. Either remove the classes referencing them, or if you just want to suppress the warnings, try adding
-dontwarn java.awt.**,java.beans.** to your proguard config.
Additional info in the ProGuard Troubleshooting Guide.