I'm trying to generate apk using Android tools > Export Signed apllication project, but I'm getting this error:
Proguard return with error code 1. See console
Console says:
[2013-08-21 17:03:56 - DisplayMetrics] Warning: there were 23 unresolved references to classes or interfaces.
[2013-08-21 17:03:56 - DisplayMetrics] You may need to specify additional library jars (using '-libraryjars').
[2013-08-21 17:03:56 - DisplayMetrics] java.io.IOException: Please correct the above warnings first.
[2013-08-21 17:03:56 - DisplayMetrics] at proguard.Initializer.execute(Initializer.java:321)
[2013-08-21 17:03:56 - DisplayMetrics] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-08-21 17:03:56 - DisplayMetrics] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-08-21 17:03:56 - DisplayMetrics] at proguard.ProGuard.main(ProGuard.java:492)
This is happening from the time I added 3 jar files in libs folder. How can I fix this?
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 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)...
This is not a question because I already found the answer.
The new Android SDK 17 has a stricter dependency check on jar files.
At the same time, they added a jar that I think wasn't there before. My project encountered a conflict between the new annotations.jar in the SDK and one that I already used. Replacing one by the other would work, if they have the same origin.
My annotations.jar is from jetbrains, via a Guice dependency, so replacing it doesn't work. This is the error I got:
[2012-03-22 10:54:27 - MyApp] Jar mismatch! Fix your dependencies
[2012-03-22 10:54:46 - MyApp] Found 2 versions of annotations.jar in the dependency list,
[2012-03-22 10:54:46 - MyApp] but not all the versions are identical (check is based on SHA-1 only at this time).
[2012-03-22 10:54:46 - MyApp] All versions of the libraries must be the same at this time.
[2012-03-22 10:54:46 - MyApp] Versions found are:
[2012-03-22 10:54:46 - MyApp] Path: /opt/android-sdk-linux_x86/tools/support/annotations.jar
[2012-03-22 10:54:46 - MyApp] Length: 1463
[2012-03-22 10:54:46 - MyApp] SHA-1: 6f59fa3a223df6f332bee8b8bffb526f7445018b
[2012-03-22 10:54:46 - MyApp] Path: /home/christine/workspace/MyApp/libs/annotations.jar
[2012-03-22 10:54:46 - MyApp] Length: 7593
[2012-03-22 10:54:46 - MyApp] SHA-1: e28fe9e70610beb9ef49226a9e56fed7a86e742a
[2012-03-22 10:54:46 - MyApp] Jar mismatch! Fix your dependencies
My annotations.jar is from jetbrains, via a Guice dependency. I renamed this file to jetbrains-annotation.jar which solved my problem.
I am following the android licensing documentation (http://developer.android.com/guide/publishing/licensing.html) and when i get to the step that I add the reference of the licensing project (in eclipse) to my project, I get an error in the console (see below) and my project doesnt build. Any ideas on how i can around this? I tried a couple searches on google, but I didnt come up with anything. Thanks.
Error seen:
[2010-09-26 05:54:41 - MyApp] ERROR: Unknown option '--auto-add-overlay'
[2010-09-26 05:54:41 - MyApp] Android Asset Packaging Tool
[2010-09-26 05:54:41 - MyApp]
[2010-09-26 05:54:41 - MyApp] Usage:
[2010-09-26 05:54:41 - MyApp] aapt l[ist] [-v] [-a] file.{zip,jar,apk}
[2010-09-26 05:54:41 - MyApp] List contents of Zip-compatible archive.
[2010-09-26 05:54:41 - MyApp]
[2010-09-26 05:54:41 - MyApp] aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]
[2010-09-26 05:54:41 - MyApp] badging Print the label and icon for the app declared in APK.
[2010-09-26 05:54:41 - MyApp] permissions Print the permissions from the APK.
[2010-09-26 05:54:41 - MyApp] resources Print the resource table from the APK.
[2010-09-26 05:54:41 - MyApp] configurations Print the configurations in the APK.
[2010-09-26 05:54:41 - MyApp] xmltree Print the compiled xmls in the given assets.
[2010-09-26 05:54:41 - MyApp] xmlstrings Print the strings of the given compiled xml assets.
...
OP: Did you manage to solve your problem?
I'm also getting this into problem while trying to use th LVL. I get this error in addition:
"Target 'Android 2.1' does not support building project with libraries."
Thanks.
Solved:
An SDK update was necessary. "Android 2.1" revision 1 was installed and revision 2 is necessary in order to use Library projects.
http://developer.android.com/guide/developing/eclipse-adt.html#libraryReqts