【问题标题】:eclipse didn't do apk with proguard.cfgeclipse 没有用 proguard.cfg 做 apk
【发布时间】:2012-01-23 15:15:35
【问题描述】:

如果我想用 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 *;
}

【问题讨论】:

    标签: android eclipse apk proguard


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-31
      • 2013-04-07
      相关资源
      最近更新 更多