gpt4 book ai didi

"Generating classes.dex...."时Android编译报错

转载 作者:行者123 更新时间:2023-11-29 02:13:39 25 4
gpt4 key购买 nike

当设置我的机器在 Android 上工作时,我无法让代码“编译”或者它可能正在编译并在其他一些进程停止,因为当它说 “Generating classes.dex 时它给出了错误".

我得到的错误如下:

Information: Note: Some input files use unchecked or unsafe operations.
Information: Note: Recompile with -Xlint:unchecked for details.
Information: Compilation completed with 12 errors and 2 warnings
Information: 12 errors
Information: 1 warning
Error: (org.joda.time.DateTimeZone$1) that doesn't come with an
Error: associated EnclosingMethod attribute. This class was probably produced by a
Error: compiler that did not target the modern .class file format. The recommended
Error: solution is to recompile the class from source, using an up-to-date compiler
Error: and without specifying any "-target" type options. The consequence of ignoring
Error: this warning is that reflective operations on this class will incorrectly
Error: indicate that it is *not* an inner class.
Error: (junitx.extensions.TestSetup$1) that doesn't come with an
Error: (junitx.ant.TestClassValidatorTask$1) that doesn't come with an
Error: (junitx.util.AbstractSuiteBuilder$1) that doesn't come with an
Error: (junitx.framework.TestSuite$1) that doesn't come with an
Error: (junitx.tool.TestClassValidator$1) that doesn't come with an
Warning: warning: Ignoring InnerClasses attribute for an anonymous inner class

有趣的是这段代码在我们很久以前设置的另一台计算机上编译正确,没有人记得做了什么。

我疯狂地用谷歌搜索,每个人都说你需要从源代码重新编译 JodaTime 等等,但这不可能是这种情况,因为相同的代码(从版本控制复制粘贴或下载)在另一台机器上可以完美运行,所以一定是我的环境导致了这种情况,但我不知道要寻找什么。

有专家能识别出这种类型的错误吗?
你有过这样的经历吗?你是怎么解决的??

请帮忙...

备注:
- 使用智能
- 为 Android 1.6 编译

在有人指出之前,我知道之前有人问过类似的问题。这里例如:Recompile jodatime? .但在那种情况下,建议的解决方案是重新编译 JodaTime 源代码。我相信这里不是这种情况,因为代码可以在一台计算机上运行,​​而不能在另一台计算机上运行。

最佳答案

您尝试过更新 IntelliJ 吗?

我根本不是专家,但几天前我遇到了同样的问题,花了很长时间才弄清楚它是什么。原来是IntelliJ版本。

只需更新到最新版本(每晚构建)即可使其正常工作。

关于 "Generating classes.dex...."时Android编译报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5746085/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com