0

当我尝试导出 APK(使用 proguard 时)时出现错误:

[2012-06-30 12:41:06 - ICDB] Proguard returned with error code 1. See console
[2012-06-30 12:41:06 - ICDB] Note: there were 29 duplicate class definitions.
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.MemberSpecificationElement: can't find superclass or interface org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: proguard.wtk.ProGuardObfuscator: can't find superclass or interface com.sun.kvem.environment.Obfuscator
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find superclass or interface org.apache.tools.ant.types.Path
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find superclass or interface org.apache.tools.ant.Task
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find superclass or interface org.apache.tools.ant.types.FileSet
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassSpecificationElement: can't find superclass or interface org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.FilterElement: can't find superclass or interface org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: library class android.content.res.XmlResourceParser extends or implements program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.MemberSpecificationElement: can't find referenced class org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.MemberSpecificationElement: can't find referenced method 'boolean isReference()' in class proguard.ant.MemberSpecificationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.MemberSpecificationElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.MemberSpecificationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.MemberSpecificationElement: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.MemberSpecificationElement: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.MemberSpecificationElement: can't find referenced class org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: proguard.wtk.ProGuardObfuscator: can't find referenced class com.sun.kvem.environment.Obfuscator
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ProGuardTask: can't find referenced method 'org.apache.tools.ant.Project getProject()' in class proguard.ant.ProGuardTask
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ProGuardTask: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.types.Path
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced method 'org.apache.tools.ant.Project getProject()' in class proguard.ant.ClassPathElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced method 'boolean isReference()' in class proguard.ant.ClassPathElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.ClassPathElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.types.Path
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.types.Path
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.types.AbstractFileSet
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.types.AbstractFileSet
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.DirectoryScanner
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.DirectoryScanner
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced method 'java.lang.String[] list()' in class proguard.ant.ClassPathElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced method 'void setLocation(java.io.File)' in class proguard.ant.ClassPathElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.DirectoryScanner
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassPathElement: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: org.acra.CrashReportData: can't find referenced method 'void setLength(int)' in class java.lang.StringBuilder
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Task
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced method 'org.apache.tools.ant.Project getProject()' in class proguard.ant.ConfigurationTask
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Task
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationTask: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.types.FileSet
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced method 'boolean isReference()' in class proguard.ant.ConfigurationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.ConfigurationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.types.AbstractFileSet
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced method 'org.apache.tools.ant.Project getProject()' in class proguard.ant.ConfigurationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.types.AbstractFileSet
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.DirectoryScanner
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.DirectoryScanner
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced method 'org.apache.tools.ant.DirectoryScanner getDirectoryScanner(org.apache.tools.ant.Project)' in class proguard.ant.ConfigurationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.types.FileSet
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.DirectoryScanner
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ConfigurationElement: can't find referenced class org.apache.tools.ant.Project
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.KeepSpecificationElement: can't find referenced method 'boolean isReference()' in class proguard.ant.KeepSpecificationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.KeepSpecificationElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.KeepSpecificationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassSpecificationElement: can't find referenced class org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassSpecificationElement: can't find referenced method 'boolean isReference()' in class proguard.ant.ClassSpecificationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassSpecificationElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.ClassSpecificationElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassSpecificationElement: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassSpecificationElement: can't find referenced class org.apache.tools.ant.BuildException
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.ClassSpecificationElement: can't find referenced class org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.FilterElement: can't find referenced class org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.FilterElement: can't find referenced method 'boolean isReference()' in class proguard.ant.FilterElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.FilterElement: can't find referenced method 'java.lang.Object getCheckedRef(java.lang.Class,java.lang.String)' in class proguard.ant.FilterElement
[2012-06-30 12:41:06 - ICDB] Warning: proguard.ant.FilterElement: can't find referenced class org.apache.tools.ant.types.DataType
[2012-06-30 12:41:06 - ICDB] Warning: com.easy.facebook.android.facebook.FBLoginManager$1: can't find referenced method 'void sync()' in class android.webkit.CookieSyncManager
[2012-06-30 12:41:06 - ICDB] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlSerializer
[2012-06-30 12:41:06 - ICDB] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.graphics.drawable.StateListDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.graphics.drawable.AnimationDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.content.res.ColorStateList depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.content.Intent depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.graphics.drawable.Drawable depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.graphics.drawable.GradientDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.graphics.drawable.NinePatchDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.view.LayoutInflater depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB] Warning: library class android.graphics.drawable.BitmapDrawable depends on program class org.xmlpull.v1.XmlPullParser
[2012-06-30 12:41:06 - ICDB]       You should check if you need to specify additional program jars.
[2012-06-30 12:41:06 - ICDB] Warning: there were 55 unresolved references to classes or interfaces.
[2012-06-30 12:41:06 - ICDB]          You may need to specify additional library jars (using '-libraryjars'),
[2012-06-30 12:41:06 - ICDB]          or perhaps the '-dontskipnonpubliclibraryclasses' option.
[2012-06-30 12:41:06 - ICDB] Warning: there were 15 instances of library classes depending on program classes.
[2012-06-30 12:41:06 - ICDB]          You must avoid such dependencies, since the program classes will
[2012-06-30 12:41:06 - ICDB]          be processed, while the library classes will remain unchanged.
[2012-06-30 12:41:06 - ICDB] Warning: there were 21 unresolved references to program class members.
[2012-06-30 12:41:06 - ICDB]          Your input classes appear to be inconsistent.
[2012-06-30 12:41:06 - ICDB]          You may need to recompile them and try again.
[2012-06-30 12:41:06 - ICDB]          Alternatively, you may have to specify the options 
[2012-06-30 12:41:06 - ICDB]          '-dontskipnonpubliclibraryclasses' and/or
[2012-06-30 12:41:06 - ICDB]          '-dontskipnonpubliclibraryclassmembers'.
[2012-06-30 12:41:06 - ICDB] Error: Please correct the above warnings first.

这是cfg文件:

有任何想法吗?

-dontpreverify

# Hold onto the mapping.text file, it can be used to unobfuscate stack traces in the developer console using the retrace tool
-printmapping mapping.txt

# Keep line numbers so they appear in the stack trace of the develeper console
-keepattributes SourceFile,LineNumberTable 

# The -optimizations option disables some arithmetic simplifications that Dalvik 1.0 and 1.5 can't handle.
-optimizations !code/simplification/arithmetic 

# Activities, services and broadcast receivers are specified in the manifest file so they won't be automatically included
-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 

# Custom view components might be accessed from your layout files
-keep public class * extends android.view.View {
    public <init>(android.content.Context);
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
    public void set*(...);
}

# event handlers can be specified in the layout files e.g. android:onClick="nextButton_onClick", I borrowed this method name notation from .NET
-keepclassmembers class * extends android.app.Activity {
    public void *_*(android.view.View);
}

# Parcelable implementations are accessed by introspection
-keepclassmembers class * implements android.os.Parcelable {
    static android.os.Parcelable$Creator CREATOR;
}

# You might want to keep your annotations
-keepattributes *Annotation*

-libraryjars lib/acra-4.2.3.jar

-keepclasseswithmembers class com.google.common.base.internal.Finalizer{
    <methods>;
}
4

1 回答 1

0

看起来您已经在 libs 目录中复制了 proguard.jar(可能还有其他 jar),因此 ProGuard 的类被包含在您的应用程序中。那可能不是你想要的。

于 2012-10-17T01:13:19.543 回答