在我在Eclipse中的Android应用程序中,我收到以下错误.
意外的顶级异常:
java.lang.IllegalArgumentException:已添加:Lorg/xmlpull/v1/XmlPullParser;
....
转换为Dalvik格式失败,错误1
仅当我将特定外部JAR文件添加到项目时才会出现此错误.我搜索了很长时间以寻找可能的解决方案,但没有一种可行的解决方案可行.我甚至尝试更改为Android 1.6而不是1.5(我使用的当前版本).
所以,我TRYING释放一些软件,但Proguard的是让我头疼.
当我尝试使用proguard导出时,我收到很多警告,即"找不到引用的类"
例如:
[2011-08-07 17:44:37 - GAME] Warning: org.simpleframework.xml.stream.StreamReader: can't find referenced class javax.xml.stream.events.XMLEvent
[2011-08-07 17:44:37 - GAME] Warning: there were 52 unresolved references to classes or interfaces.
[2011-08-07 17:44:37 - GAME] You may need to specify additional library jars (using '-libraryjars'),
[2011-08-07 17:44:37 - GAME] or perhaps the '-dontskipnonpubliclibraryclasses' option.
[2011-08-07 17:44:37 - GAME] java.io.IOException: Please correct the above warnings first.
[
Run Code Online (Sandbox Code Playgroud)
警告似乎与simpleframework有关,所以在我的proguard配置文件中我添加了以下内容:
-libraryjars pathtoprojecttolibs\simple-xml-2.4.jar
Run Code Online (Sandbox Code Playgroud)
pathtoprojecttolibs我的项目引用的jar的路径在哪里.
这没什么区别.
如果simpleframework引用javax我可以告诉proguard也忽略它吗?
有任何想法吗?
为什么Eclipse在构建Android项目时会陷入构建工作区的无限循环......以及(重新)构建工作区......以及(重新)构建工作区...
这是一个已知的错误?
摆脱这个循环的正确方法是什么?
笔记:
Project > Build Automatically,它构建良好,甚至导出一个完美运行的签名版本APK.BuildConfig.DEBUG可能相关也可能不相关.但它没有在r18中修复???请不要"盲目拍摄":只有当你亲身经历过这种惊人的现象(并解决它)或者能够指出一篇经历过这种神奇现象(并解决了它)的文章时,才回答这个问题.
最新的Android ADT更新破坏了我的生活.有没有办法下载并安装旧的ADT(14之前)到干净的Eclipse安装?我没有在任何地方找到该文件.
编辑:我不再需要这个,但如果有人知道答案,继续说出来.
我更新了我Eclipse的新版本,现在我无法导出已签名的应用程序.以下是错误报告:
eclipse.buildId=M20110909-1335
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=hr_HR
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
Error
Wed Dec 14 15:58:02 CET 2011
Failed to export application
Command-line Error 2
Output:
ERROR: Unknown command 'crunch'
Android Asset Packaging Tool
Usage:
aapt l[ist] [-v] [-a] file.{zip,jar,apk}
List contents of Zip-compatible archive.
aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]
badging Print the label and icon for the app declared …Run Code Online (Sandbox Code Playgroud) 我试图在我的Android应用程序上运行Proguard并遇到问题.
我正在使用SpongyCastle jar(复制和过去的完整充气城堡与包重命名,所以它不与版本中建立的机器人充气城堡冲突)
运行proguard时,我看到以下内容
我该如何解决?将rt.jar添加到我的库中?
proguard的重点是缩小代码,但我不断添加jar来解决这些问题,其中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: …Run Code Online (Sandbox Code Playgroud) 我最近遇到了一个令人费解的问题,没有解释我以某种方式设法解决.
该解决方案本身提出了一个问题,我是因为我不明白:它迫使我直接Proguard的忽略关于我自己的应用程序在其包中的所有的警告全部.
-dontwarn com.bta.**
Run Code Online (Sandbox Code Playgroud)
除了在我的开发中忽略关于最容易出错的代码的警告(最常见的代码更改)这一令人不安的问题,我对两个问题感到困惑:
我相信我介绍的一些新代码或库导致了这个问题(AdMob?),但对此有何解释?为什么第三方库会强迫我关闭我自己的应用程序资源的警告?
完全关闭我自己的应用程序包的警告有什么副作用(就像我一样)?
我刚刚将Android SDK,ADT和Proguard升级到最新版本.
我的项目编译构建并在调试模式下运行良好,但是一旦我尝试导出它的签名版本APK,我就会从Eclipse控制台上的导出向导收到错误而没有任何错误日志消息!*

如果我尝试通过Window->Show View->Error Log所有查看错误日志,我看到更多相同:

我不知道该怎么办,因为Eclipse和Proguard都不会暗示问题是什么.
我的项目在最近的升级之前一直很好.没有构建警告.没有棉绒警告!
我正在使用Android的标准配置文件${sdk.dir}\tools\proguard\proguard-android.txt:
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-dontoptimize
-dontpreverify
-keepattributes *Annotation*
-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.BackupAgent
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class * extends android.support.v4.app.Fragment
-keep …Run Code Online (Sandbox Code Playgroud) 似乎Proguard在重命名/重新打包类时没有尝试避免命名与库JAR中的类的冲突.这是正确的,还是我没有正确配置?
我正在混淆使用最新Google AdMob SDK的Android应用程序.以前我使用旧的AdMob SDK没有问题.新的SDK JAR文件包含一些经过混淆的类.其中一个类a.class位于默认/未命名的包中.当我混淆我的应用程序时,Proguard重命名/重新打包我的一个类也在a.class未命名的包中,尽管已经在AdMob JAR中读取了一个库JAR(因此它应该知道这将导致冲突).可以预见,当dx工具尝试在单个.dex文件中组合这两个具有相同名称的类时,我的构建失败.
作为一种解决方法,我已经重新配置了Proguard,以便它将我的所有类移动到一个命名包(只是一个字母),以避免与Google类冲突,但我很想知道是否有更好的解决方案,或者这是Proguard当前版本(4.6)的限制?
升级到新的Android工具后,我收到来自Proguard的以下警告:
Warning: scala.xml.EntityRef: can't find referenced class scala.xml.EntityRef$$anonfun$text$1
Warning: scala.xml.dtd.AttrDecl$: can't find referenced class scala.xml.dtd.AttrDecl$$anonfun$toString$1
Warning: scala.collection.mutable.LinkedListLike: can't find referenced class scala.collection.mutable.LinkedListLike$$anonfun$insert$1
Warning: scala.xml.NamespaceBinding: can't find referenced class scala.xml.NamespaceBinding$$anonfun$toString$1
Warning: scala.xml.NamespaceBinding: can't find referenced class scala.xml.NamespaceBinding$$anonfun$buildString$1
Warning: scala.xml.MetaData$: can't find referenced class scala.xml.MetaData$$anonfun$toString$1
Warning: scala.xml.MetaData$: can't find referenced class scala.xml.MetaData$$anonfun$toString1$1
Warning: scala.collection.immutable.BitSet: can't find referenced class scala.collection.immutable.BitSet$$anonfun$$plus$1
Warning: scala.collection.immutable.BitSet: can't find referenced class scala.collection.immutable.BitSet$$anonfun$$minus$1
Warning: scala.collection.mutable.FlatHashTable$$anonfun$checkConsistent$1: can't find referenced class scala.collection.mutable.FlatHashTable$$anonfun$checkConsistent$1$$anonfun$apply$mcVI$sp$1
Warning: scala.collection.immutable.RedBlack: can't find referenced class scala.collection.immutable.RedBlack$Empty
Warning: scala.collection.immutable.BitSet$: …Run Code Online (Sandbox Code Playgroud) AdMob已经在我的Android应用程序中工作了一段时间,直到最近我尝试更新时.我试图更新应用程序本身但我看到它一直在崩溃.
我试着调试发生的事情.删除广告后,该应用似乎有效.我现在已经发布了没有任何广告的应用程序,它工作正常.有什么原因可能会突然停止工作?我之前没有更改过任何代码.我更改的唯一代码是我的关系提示应用中的其他提示.