I am working on an Android library project. I want to distribute this library as a JAR to other developers. Before distributing the JAR, I want to trick it. I tried using PROGUARD for this purpose, but on my last failure and said
The output jar is empty. Did you specify the proper '-keep' options?
Can anyone suggest what is going wrong?
================== EDIT: Error log ===========================>
ProGuard, version 4.7
Reading program jar [C:\Users\XYZ\Downloads\login.jar]
Reading library jar [D:\Softwares\Android SDK\adt-bundle-windows-x86-20130522\sdk\platforms\android-8\android.jar]
Note: the configuration refers to the unknown class 'javax.swing.plaf.ComponentUI'
Note: the configuration refers to the unknown class 'javax.swing.plaf.ComponentUI'
Note: the configuration refers to the unknown class 'javax.swing.JComponent'
Note: there were 3 references to unknown classes.
You should check your configuration for typos.
The output jar is empty. Did you specify the proper '-keep' options?
================ Edit: proguard.cfg ============================== =======
-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
-keep public class MyClass extends MyView {
public static String GetSessionID () {
    }
}
-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 *;
}
source
share