Proguard 在 java.lang.StringBuilder 中找不到方法

发布于 2025-01-07 14:18:22 字数 387 浏览 0 评论 0原文

我有一个正在开发的 Android 应用程序,除了 Proguard 代码混淆之外,我还经常创建签名的 APK。一切都很顺利,直到今天,当 Proguard 显示这些警告时

Warning: org.acra.CrashReportData: can't find referenced method 'void setLength(int)' in class java.lang.StringBuilder

,我从未更改过 ACRA 或其类中的任何内容,而且我确信没有触及 java.lang.StringBuilder 类中的任何内容,但 Proguard 显示了此警告并且最终给出一个错误,指出我应该首先修复警告...

该怎么办?这实在是太奇怪了,因为它是从无到有的!

I have an android application in development where I frequently create signed APKs in addition with Proguard code obfuscation. Everything went well until today, when Proguard showed up these warning

Warning: org.acra.CrashReportData: can't find referenced method 'void setLength(int)' in class java.lang.StringBuilder

I have never changed anything in ACRA or it's classes and I'm sure as hell didn't touch anything from the java.lang.StringBuilder class, but Proguard is showing this warning and ending up giving an error stating that I should fix the warnings first...

What to do? This is really strange as it came out from nothing!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

停滞 2025-01-14 14:18:22

面临同样的问题。谷歌搜索后,找到以下链接。

https://svn.concord.org/svn/projects/vendor/phet/current/simulations-java/build-tools/proguard3.8/docs/manual/troubleshooting.html

只是在我的 ant 构建脚本中添加了这一行并且它起作用了。

-dontskipnonpubliclibraryclasses

Faced the same issue. After googling, found the below link.

https://svn.concord.org/svn/projects/vendor/phet/current/simulations-java/build-tools/proguard3.8/docs/manual/troubleshooting.html

Just added this line in my ant buildscript and it worked.

-dontskipnonpubliclibraryclasses

二智少女 2025-01-14 14:18:22

我找到了一个解决方案,但这对我来说仍然有点尴尬...我尝试按照我尝试导出签名包之前所做的步骤进行操作,引导我找到解决方案的一步是我下载了一个新的包版本的 Android SDK,所有 SDK 最高可达 API 级别 16,并将其用作我的 Eclipse 项目中的新 Android SDK。

当我使用我的“旧”SDK(仅支持 API 级别 13 之前的版本)时,一切都像以前一样顺利......?

I found a solution but this still seems a little bit awkward to me... I tried to follow the steps I made previous to my attempt to export a signed package and the one step which guided me to my solution was that I downloaded a new version of Android SDK with all SDK up to API level 16 and used it as my new Android SDK in my Eclipse project.

As soon as I used my "old" SDK which only supports the versions until API level 13 everything went well and as smooth as it was before...?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文