Proguard返回错误代码1.请参阅控制台
Warning: com.google.api.client.extensions.jdo.JdoDataStoreFactory$JdoValue: can't find superclass or interface javax.jdo.spi.PersistenceCapable
Warning: com.google.api.client.extensions.jdo.JdoDataStoreFactory: can't find referenced class javax.jdo.PersistenceManagerFactory
Warning: com.google.api.client.extensions.jdo.JdoDataStoreFactory: can't find referenced class javax.jdo.PersistenceManagerFactory
Warning: com.google.api.client.extensions.jdo.JdoDataStoreFactory: can't find referenced class javax.jdo.PersistenceManagerFactory
Warning: com.google.api.client.extensions.jdo.JdoDataStoreFactory: can't find referenced class javax.jdo.PersistenceManagerFactory
这是proguard配置文件 这是ProGuard的配置文件。 http://proguard.sourceforge.net/index.html#manual/usage.html
#优化:如果您不想进行优化,请使用 #proguard-android.txt配置文件而不是这一个 #关闭优化标志。添加优化介绍 #某些风险,因为例如并非所有优化都由 #ProGuard适用于所有版本的Dalvik。以下标志转向 #已知有问题的各种优化,但列表可能不会 #完成或更新。 ("算术"优化可以 #如果您仅定位到Android 2.0或更高版本,则使用。)请确保您 #如果你走这条路,彻底测试。 -optimizations!代码/简化/算术,!代码/简化/演员,!field / ,!class / merge / - 优化通过5 -allowaccessmodification -dontpreverify
# The remainder of this file is identical to the non-optimized version
# of the Proguard configuration file (except that the other file has
# flags to turn off optimization).
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-keepattributes *Annotation*
-keep public class javax.jdo.** { *; }
-keep interface javax.jdo.** { *; }
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
-keep class com.android.vending.billing.**
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
native <methods>;
}
# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}
# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
-dontwarn com.lowagie.text.pdf.**
-dontwarn javax.management.**
-dontwarn java.lang.management.**
-dontwarn org.apache.log4j.**
-dontwarn org.apache.commons.logging.**
-dontwarn org.slf4j.**
-dontwarn org.json.**
-dontwarn com.dropbox.sync.**
#Added for SDS
-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
-keep public class android.widget.Toast
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class com.actionbarsherlock.** { *; }
-keep interface com.actionbarsherlock.** { *; }
-keep class de.psdev.licensesdialog.** { *; }
-keep interface de.psdev.licensesdialog.** { *; }
-keep class com.googlecode.** { *; }
-keep interface com.googlecode.** { *; }
-keep class org.simpleframework.xml.** { *; }
-keep interface org.simpleframework.xml.** { *; }
-keep class com.facebook.** { *; }
-keepattributes Signature
-keep class com.softxpert.sds.frontend.activities.RecommendUsFacebookActivity
-keep class twitter4j.** { *; }
-keep class com.dropbox.ledger.** { *; }
-keep interface com.dropbox.ledger.** { *; }
#keep all classes that might be used in XML layouts
-keep public class * extends android.view.View
-keep public class * extends android.app.Fragment
-keep public class * extends android.support.v4.Fragment
#down warns for test package
-dontwarn **CompatHoneycomb
-dontwarn org.htmlcleaner.*
-dontwarn org.junit.*
-dontwarn javax.xml.stream.events.*
-dontwarn javax.xml.stream.*
-dontwarn javax.*
-dontwarn org.apache.commons.logging.*
-dontwarn javax.servlet.http.*
-dontwarn org.opencv.*
-dontwarn org.openid4java.**
-dontwarn org.openid4java.message.*
-dontwarn com.google.android.**
-dontwarn android.support.v4.**
-dontwarn com.google.api.client.extensions
#ACRA specifics
# we need line numbers in our stack traces otherwise they are pretty useless
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
# ACRA needs "annotations" so add this...
-keepattributes *Annotation*
# keep this class so that logging will show 'ACRA' and not a obfuscated name like 'a'.
# Note: if you are removing log messages elsewhere in this file then this isn't necessary
-keep class org.acra.ACRA {
*;
}
# keep this around for some enums that ACRA needs
-keep class org.acra.ReportingInteractionMode {
*;
}
-keepnames class org.acra.sender.HttpSender$** {
*;
}
-keepnames class org.acra.ReportField {
*;
}
# keep this otherwise it is removed by ProGuard
-keep public class org.acra.ErrorReporter
{
public void addCustomData(java.lang.String,java.lang.String);
public void putCustomData(java.lang.String,java.lang.String);
public void removeCustomData(java.lang.String);
}
# keep this otherwise it is removed by ProGuard
-keep public class org.acra.ErrorReporter
{
public void handleSilentException(java.lang.Throwable);
}
答案 0 :(得分:1)
在项目的proguard-project.txt
文件中,您需要添加您使用的JDO类的JAR文件。例如:
-injars libs/jdo-1.0.0.jar
注意:jdo-1.0.0.jar
只是一个例子。您需要将其替换为项目的libs
目录下的JDO JAR文件的实际名称。