1
votes

Proguard returned with error code 1. See console

 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

and here is the proguard config file This is a configuration file for ProGuard. http://proguard.sourceforge.net/index.html#manual/usage.html

# Optimizations: If you don't want to optimize, use the # proguard-android.txt configuration file instead of this one, which # turns off the optimization flags. Adding optimization introduces # certain risks, since for example not all optimizations performed by # ProGuard works on all versions of Dalvik. The following flags turn # off various optimizations known to have issues, but the list may not # be complete or up to date. (The "arithmetic" optimization can be # used if you are only targeting Android 2.0 or later.) Make sure you # test thoroughly if you go this route. -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/,!class/merging/ -optimizationpasses 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);
}
1
Which is your JDO entry in the config? - ChuongPham

1 Answers

1
votes

In your project's proguard-project.txt file, you'll need to add the JAR file of the JDO classes you used. For example:

-injars libs/jdo-1.0.0.jar

Note: jdo-1.0.0.jar is just an example. You will need to substitute it with the actual name of the JDO JAR file under your project's libs directory.