3

This is my current proguard config file for my Android project:

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-repackageclasses
-libraryjars "libs/**.so"
-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

-keep public class com.scoreloop.** {*;}
-keep public class com.facebook.** {*;}
-keep public class com.google.ads.** {*;}

-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclasseswithmembernames class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembernames class * {
    public <init>(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 *;
}

-assumenosideeffects class android.util.Log {
    public static *** i(...);
    public static *** v(...);
    public static *** d(...);
}

What would be the correct way to prevent Proguard from trying to mess with the shared objects? I'm currently getting an error as soon as I add them to my project, and try to export an application: You should check if you need to specify additional program jars. After I add the -libraryjars line it's giving me: java.io.IOException: Can't read [proguard.ClassPathEntry@56f0474c] (No such file or directory). How would I fix my Proguard config file?

pqn
  • 1,522
  • 3
  • 22
  • 33
  • 1
    Proguard doesn't do anything with .so-files. Indeed, the only files it messes with are class files. – Andy Aug 02 '11 at 19:51
  • Thanks, I realized that the .so files didn't cause the initial problem now. – pqn Aug 02 '11 at 20:04

1 Answers1

0

Cfr. ProGuard manual > Troubleshooting

The console output above "You should check if you need to specify additional program jars." actually tells what is wrong.

Eric Lafortune
  • 45,150
  • 8
  • 114
  • 106