eclipse没有用proguard.cfg做apk

时间:2012-01-23 15:15:35

标签: android eclipse apk proguard

如果我想用proguard,eclipe创建apk,他告诉我这个并没有做apk

  ava.io.IOException: Can't read [proguard.ClassPathEntry@6d632c2d] (No such file or directory)

我在这个链接中测试了解决方案: http://code.google.com/p/android/issues/detail?id=18359 还有这个 https://stackoverflow.com/questions/2...n-external-jar

我想我有这个消息因为proguard没有编译因为他们对jar库有问题。如何解决这个问题呢?

这是礼仪的内容

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.

# Project target.
target=Google Inc.:Google APIs:7
proguard.config=proguard.cfg

这是proguard文件的内容

-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

-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 *;
}

1 个答案:

答案 0 :(得分:0)

经过多次搜索,问题是因为我使用了iText库。 OpenSource库不适用于proguard。对于与proguard一起使用的库,必须使用付费版本。