我正试图在我的Android应用程序上运行Proguard,并且遇到了一些问题。
我使用的是SpongyCastle jar (复制和过去的包重命名的完整弹跳城堡,这样它就不会与在版本中建造的机器人弹跳城堡冲突)
在运行过程保护程序时,我看到以下内容
我该怎么解决这个问题?把rt.jar加到我的唇上?
程序保护的全部目的是收缩代码,但是我不断地添加jars来解决这些问题,当proguard抱怨它找不到类时!我是不是遗漏了什么?
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.InitialDirContext
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.InitialDirContext
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attributes
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attribute
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attribute
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingException
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.Attributes
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchResult
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.SearchControls
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingEnumeration
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.NamingException
[proguard] Warning: org.spongycastle.x509.util.LDAPStoreHelper: can't find referenced class javax.naming.directory.DirContext
[proguard] Note: the configuration refers to the unknown class 'android.app.backup.BackupAgentHelper'
[proguard] Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService'
[proguard] Note: there were 2 references to unknown classes.
[proguard] You should check your configuration for typos.
[proguard] Warning: there were 57 unresolved references to classes or interfaces.
[proguard] You may need to specify additional library jars (using '-libraryjars'),
[proguard] or perhaps the '-dontskipnonpubliclibraryclasses' option.
UILD FAILED
:\AndroidSDK\android-sdk_r12-windows\android-sdk-windows\tools\ant\build.xml:713: Please correct the above warnings first.更新
ANT Script我使用android update project --path .生成build.xml,因为项目是在不久前创建的,而且我还没有做任何更改
<?xml version="1.0" encoding="UTF-8"?>
<project name="RootActivity" default="help">
<loadproperties srcFile="local.properties" />
<property file="ant.properties" />
<loadproperties srcFile="project.properties" />
<fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'" unless="sdk.dir" />
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>发布于 2011-12-16 22:42:39
我不认为有必要在你的库中添加rt.jar。你需要确保你在你的守护脚本中正确地引用了它。以这里为例。第2节中的这一行是货币制造者:
-libraryjars ${java.home}/lib/rt.jar尽管如此,如果您使用xml表示法来进行保护,则语法会发生变化。如果你发布了蚂蚁脚本中负责的部分,我可以尝试提供更多的帮助。希望这能有所帮助!
发布于 2011-12-16 23:13:10
将以下内容( -dontwarn javax.naming.** )添加到Proguard配置中。
他们只是警告,忽视他们不应该是一个问题。
https://stackoverflow.com/questions/8540905
复制相似问题