2

Eclipse でプロジェクト ( Osmand )から Android アプリケーションをエクスポートしようとしましたが、問題はプロガードがエラー コード 1 を返したことです。以前は複数の警告がスローされていたため、「-dontwarn」コマンドを使用しました。これで、コンソールは次のように表示されます。

Proguard returned with error code 1. See console
Note: there were 227 duplicate class definitions.
You should check if you need to specify additional program jars.
Unexpected error while evaluating instruction:
    Class       = [com/actionbarsherlock/app/SherlockFragmentActivity]
    Method      = [getSherlock()Lcom/actionbarsherlock/ActionBarSherlock;]
    Instruction = [10] invokestatic #36
    Exception   = [java.lang.IllegalArgumentException] (Can't find common super class     of [android/app/Activity] (with 11 known super classes) and     [com/actionbarsherlock/app/SherlockFragmentActivity] (with 6 known super classes))
Unexpected error while performing partial evaluation:
    Class       = [com/actionbarsherlock/app/SherlockFragmentActivity]
    Method      = [getSherlock()Lcom/actionbarsherlock/ActionBarSherlock;]
    Exception   = [java.lang.IllegalArgumentException] (Can't find common super class of [android/app/Activity] (with 11 known super classes) and [com/actionbarsherlock/app/SherlockFragmentActivity] (with 6 known super classes))
java.lang.IllegalArgumentException: Can't find common super class of [android/app/Activity] (with 11 known super classes) and [com/actionbarsherlock/app/SherlockFragmentActivity] (with 6 known super classes)
...   

Proguard 構成ファイル:

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-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 * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService

-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 class * extends android.app.Activity {
   public void *(android.view.View);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
      public static final android.os.Parcelable$Creator *;
}


#this part was added:
-dontwarn android.support.v4.app.Watson
-dontwarn com.actionbarsherlock.**
-dontwarn com.dropbox.client2.**
-dontwarn net.osmand.plus.activities.search.**
-dontwarn net.osmand.plus.activities.NavigatePointFragment
-dontwarn net.osmand.plus.activities.FavouritesListFragment
-dontwarn net.osmand.plus.activities.FavouritesListActivity
-dontwarn net.osmand.plus.activities.FavouritesListFragment$FavouritesAdapter

私は何をすべきか?

4

0 に答える 0