1.在progruad.cfg里面配置好
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*-keep public class * extends android.app.*Activity { public * ; }
-keep public class * extends android.app.Service { public * ; }
-keep public class * extends android.content.BroadcastReceiver { public * ; }
-keep public class * extends android.content.ContentProvider { public * ; }
-keep public class * extends android.view.View { public * ; }
-keep public class * extends android.widget.BaseAdapter { public * ; }
-keep public class * extends android.database.sqlite.SQLiteOpenHelper { public * ; }通过eclipse打包一个未签名的APK,提示以下警告。
 Proguard returned with error code 1. See console
  Warning: proguard.ant.MemberSpecificationElement: can't find superclass or interface org.apache.tools.ant.types.DataType
 Warning: proguard.ant.ConfigurationElement: can't find superclass or interface org.apache.tools.ant.types.DataType
 Warning: proguard.ant.FilterElement: can't find superclass or interface org.apache.tools.ant.types.DataType
 Warning: proguard.ant.KeepAttributeElement: can't find superclass or interface org.apache.tools.ant.types.DataType
  Warning: proguard.wtk.ProGuardObfuscator: can't find superclass or interface com.sun.kvem.environment.Obfuscator
  Warning: proguard.ant.ClassPathElement: can't find superclass or interface org.apache.tools.ant.types.Path
 Warning: proguard.ant.ConfigurationTask: can't find superclass or interface org.apache.tools.ant.Task
 Warning: proguard.ant.ClassSpecificationElement: can't find superclass or interface org.apache.tools.ant.types.DataType
  Warning: proguard.ant.MemberSpecificationElement: can't find referenced class org.apache.tools.ant.types.DataType
  Warning: proguard.ant.MemberSpecificationElement: can't find referenced method 'boolean isReference()' in class proguard.ant.MemberSpecificationElement
  Warning: proguard.ant.MemberSpecificationElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.MemberSpecificationElement
  Warning: proguard.ant.MemberSpecificationElement: can't find referenced class org.apache.tools.ant.BuildException
 Warning: proguard.ant.MemberSpecificationElement: can't find referenced class org.apache.tools.ant.BuildException
 Warning: proguard.ant.MemberSpecificationElement: can't find referenced class org.apache.tools.ant.types.DataType
  Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.types.DataType
  Warning: proguard.ant.ConfigurationElement: can't find referenced method 'boolean isReference()' in class proguard.ant.ConfigurationElement
  Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.BuildException
  Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.BuildException
 Warning: proguard.ant.ConfigurationElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.ConfigurationElement
  Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.types.DataType
  Warning: proguard.ant.FilterElement: can't find referenced class org.apache.tools.ant.types.DataType
  Warning: proguard.ant.FilterElement: can't find referenced method 'boolean isReference()' in class proguard.ant.FilterElement
  Warning: proguard.ant.FilterElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.FilterElement
 Warning: proguard.ant.FilterElement: can't find referenced class org.apache.tools.ant.types.DataType
  Warning: proguard.ant.KeepAttributeElement: can't find referenced class org.apache.tools.ant.types.DataType
  Warning: proguard.ant.KeepAttributeElement: can't find referenced method 'boolean isReference()' in class proguard.ant.KeepAttributeElement
  Warning: proguard.ant.KeepAttributeElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.KeepAttributeElement
  Warning: proguard.ant.KeepAttributeElement: can't find referenced class org.apache.tools.ant.types.DataType
 Warning: proguard.wtk.ProGuardObfuscator: can't find referenced class com.sun.kvem.environment.Obfuscator
 Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.BuildException
  Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.BuildException
  Warning: proguard.ant.ProGuardTask: can't find referenced method 'org.apache.tools.ant.Project getProject()' in class proguard.ant.ProGuardTask
 Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.Project
  Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.Project
   。
  Warning: proguard.ant.ClassPathElement: can't find referenced method 'java.lang.String[] list()' in class proguard.ant.ClassPathElement
  Warning: proguard.ant.ClassPathElement: can't find referenced method 'void setLocation(java.io.File)' in class proguard.ant.ClassPathElement
[  Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.Project
  Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.DirectoryScanner
  Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.Project
 Warning: proguard.ant.ConfigurationTask: can't find referenced  
 Warning: proguard.ant.ConfigurationTask: can't find referenced method 'org.apache.tools.ant.Project getProject()' in class proguard.ant.ConfigurationTask
  Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Project
  Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Project
  Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.BuildException
  Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.BuildException
  Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Task
 Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Project
  Warning: proguard.ant.KeepSpecificationElement: can't find referenced method 'boolean isReference()' in class proguard.ant.KeepSpecificationElement
  Warning: proguard.ant.KeepSpecificationElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.KeepSpecificationElement
  Warning: proguard.ant.ClassSpecificationElement: can't find referenced class org.apache.tools.ant.types.DataType
  Warning: proguard.ant.ClassSpecificationElement: can't find referenced method 'boolean isReference()' in class proguard.ant.ClassSpecificationElement
 Warning: proguard.ant.ClassSpecificationElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.ClassSpecificationElement
  Warning: proguard.ant.ClassSpecificationElement: can't find referenced class org.apache.tools.ant.BuildException
  Warning: proguard.ant.ClassSpecificationElement: can't find referenced class org.apache.tools.ant.BuildException
  Warning: proguard.ant.ClassSpecificationElement: can't find referenced class org.apache.tools.ant.types.DataType
       You should check if you need to specify additional program jars.
  Warning: there were 49 unresolved references to classes or interfaces.
        You may need to specify additional library jars (using '-libraryjars'),
         or perhaps the '-dontskipnonpubliclibraryclasses' option.
 Warning: there were 19 unresolved references to program class members.
          Your input classes appear to be inconsistent.
          You may need to recompile them and try again.
         Alternatively, you may have to specify the options 
         '-dontskipnonpubliclibraryclasses' and/or
          '-dontskipnonpubliclibraryclassmembers'.
  java.io.IOException: Please correct the above warnings first.
  at proguard.Initializer.execute(Initializer.java:308)
  at proguard.ProGuard.initialize(ProGuard.java:210)
  at proguard.ProGuard.execute(ProGuard.java:85)
   at proguard.ProGuard.main(ProGuard.java:499)