I am getting Error While Export my Android Application From Eclipse which use android-support-v4.jar with Proguard?

Adding the following to proguard. Cfg worked for me. I think its because you are not using honeycomb but the compatibility library has some honeycomb specific things in it.

Up vote 0 down vote favorite share g+ share fb share tw.

Can any one help me which I am using ProGuard in my Android Application I am getting Following Error While I am Signed it to Export. Here what my Console Show me. 2011-11-03 16:07:52 - AndroidViewPager Proguard returned with error code 1.

See console 2011-11-03 16:07:52 - AndroidViewPager Note: there were 95 duplicate class definitions. 2011-11-03 16:07:52 - AndroidViewPager Warning: android.support. V4.os.

ParcelableCompatCreatorHoneycombMR2: can't find superclass or interface android.os. Parcelable$ClassLoaderCreator 2011-11-03 16:07:52 - AndroidViewPager Warning: android.support. V4.app.

ActivityCompatHoneycomb: can't find referenced method 'void invalidateOptionsMenu()' in class android.app. Activity 2011-11-03 16:07:52 - AndroidViewPager Warning: android.support. V4.app.

ActivityCompatHoneycomb: can't find referenced method 'void dump(java.lang. String,java.io. FileDescriptor,java.io.

PrintWriter,java.lang. String)' in class android.app. Activity 2011-11-03 16:07:52 - AndroidViewPager Warning: android.support.

V4.os. ParcelableCompatCreatorHoneycombMR2: can't find referenced class android.os. Parcelable$ClassLoaderCreator 2011-11-03 16:07:52 - AndroidViewPager Warning: android.support.

V4.os. ParcelableCompatCreatorHoneycombMR2: can't find referenced class android.os. Parcelable$ClassLoaderCreator 2011-11-03 16:07:52 - AndroidViewPager Warning: android.support.

V4.view. MenuCompatHoneycomb: can't find referenced method 'void setShowAsAction(int)' in class android.view. MenuItem 2011-11-03 16:07:52 - AndroidViewPager Warning: there were 3 unresolved references to classes or interfaces.

2011-11-03 16:07:52 - AndroidViewPager You may need to specify additional library jars (using '-libraryjars'), 2011-11-03 16:07:52 - AndroidViewPager or perhaps the '-dontskipnonpubliclibraryclasses' option. 2011-11-03 16:07:52 - AndroidViewPager Warning: there were 3 unresolved references to program class members. 2011-11-03 16:07:52 - AndroidViewPager Your input classes appear to be inconsistent.

2011-11-03 16:07:52 - AndroidViewPager You may need to recompile them and try again. 2011-11-03 16:07:52 - AndroidViewPager Alternatively, you may have to specify the options 2011-11-03 16:07:52 - AndroidViewPager '-dontskipnonpubliclibraryclasses' and/or 2011-11-03 16:07:52 - AndroidViewPager '-dontskipnonpubliclibraryclassmembers'. 2011-11-03 16:07:52 - AndroidViewPager java.io.

IOException: Please correct the above warnings first. 2011-11-03 16:07:52 - AndroidViewPager at proguard.Initializer. Execute(Initializer.

Java:308) 2011-11-03 16:07:52 - AndroidViewPager at proguard.ProGuard. Initialize(ProGuard. Java:210) 2011-11-03 16:07:52 - AndroidViewPager at proguard.ProGuard.

Execute(ProGuard. Java:85) 2011-11-03 16:07:52 - AndroidViewPager at proguard.ProGuard. Main(ProGuard.

Java:499) I think in jar may be some thing not proper. How to give specify additional library jars I am using following Proguard. Cfg file optimizationpasses 5 -dontpreverify -verbose -libraryjars 'E:\Himanshu\AndroidViewPager\libs\android-support-v4.

Jar' -dontskipnonpubliclibraryclasses -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 * extends android.app.backup.

BackupAgentHelper -keep public class * extends android.preference. Preference -keep public class com.android.vending.licensing. ILicensingService -keepclasseswithmembernames class * { native ; } -keepclasseswithmembernames class * { public (android.content.

Context, android.util. AttributeSet); } -keepclasseswithmembernames class * { public (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 *; } android jar proguard link|improve this question asked 11-11-03 at 10:49Herry803213 78% accept rate.

Adding the following to proguard. Cfg worked for me. I think its because you are not using honeycomb but the compatibility library has some honeycomb specific things in it.

-dontwarn CompatHoneycomb -keep class android.support. V4. { *; } -dontwarn **CompatCreatorHoneycombMR2 -dontwarn **ActivityCompatHoneycomb -dontwarn **MenuCompatHoneycomb Also, remove libraryjars 'E:\Himanshu\AndroidViewPager\libs\android-support-v4.jar.

You make me to remove libraryjars that means does it will make optimize for jars I use. – Herry Nov 3 '11 at 12:07 Only a suggestion. Leave it if it still works for you.

I thought that was your attempt to fix the error you were experiencing. – Kuffs Nov 3 '11 at 13:57 1 The -libraryjars option is causing all those duplicate class definitions, since the build script already includes all jars in the libs directory as program jars (which are then optimized). You should remove the option indeed.

– Eric Lafortune Nov 3 '11 at 21:39 @EricLafortune Thanks For Comment ,so I don't need to provide -libraryjars option in my android project right. – Herry Nov 3 '11 at 4:57.

Method void setShowAsAction(int) is not available in compatibility library. Try using menu's xml file parameters.

I am not getting where should I have to do can you give some more hint – Herry Nov 3 '11 at 11:12 1 Look at this tutorial on how to use Menu. Xml to add action item to the Action Bar which is backward compatible. Android-codelabs.appspot.com/resources/tutorials/honeypad/… Step 3 – Rajdeep Dua Nov 3 '11 at 11:16 @ also I need that library for only use of ViewPager and PagerAdapter – Herry Nov 3 '11 at 11:18 @But in my app I use only onCreateOptionsMenu – Herry Nov 3 '11 at 11:20.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions