gpt4 book ai didi

android adt 17 - 将 jar 添加到项目 - dexedlibs 中的 jar/仅包含 list

转载 作者:行者123 更新时间:2023-11-29 18:05:08 26 4
gpt4 key购买 nike

我正在使用 java 1.7 在 win 7 x64 上使用 3 天前下载的 adt 17。

向我的新示例项目添加一个 jar(通过将其复制到 libs/)编译正常,但在运行时抛出,因为 jar 中的类不在 dexedlibs/中的相应 jar 中 - 该 jar 仅包含一个 list 。

相关链接:http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17http://tools.android.com/recent/dealingwithdependenciesinandroidprojects .

执行链接中建议的一些导出和订购操作没有帮助。

如今人们怎么知道如何将 jar 添加到 android 项目中?

编辑:感谢 max:jar 是使用 java 1.7 制作的,指定 1.6 停止了抛出,但由于某种原因我仍然缺少一些方法(这些没有被调用,但它们被引用)。

12-20 23:02:13.689: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 
12-20 23:02:13.689: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:13.689: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:13.949: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:13.949: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:14.829: I/dalvikvm(27907): Could not find method com.tayek.utilities.Utilities.store, referenced from method com.tayek.qanda.Model.toPropertiesFile
12-20 23:02:14.829: W/dalvikvm(27907): VFY: unable to resolve static method 3399: Lcom/tayek/utilities/Utilities;.store (Ljava/io/File;Ljava/util/Properties;)V
12-20 23:02:14.829: D/dalvikvm(27907): VFY: replacing opcode 0x71 at 0x000f
12-20 23:02:14.849: I/dalvikvm(27907): Could not find method com.tayek.utilities.Utilities.store, referenced from method com.tayek.qanda.Model.toPropertiesFile
12-20 23:02:14.849: W/dalvikvm(27907): VFY: unable to resolve static method 3399: Lcom/tayek/utilities/Utilities;.store (Ljava/io/File;Ljava/util/Properties;)V
12-20 23:02:14.849: D/dalvikvm(27907): VFY: replacing opcode 0x71 at 0x0014
12-20 23:02:14.849: I/dalvikvm(27907): Could not find method com.tayek.utilities.Utilities.store, referenced from method com.tayek.qanda.Model.toPropertiesFile
12-20 23:02:14.849: W/dalvikvm(27907): VFY: unable to resolve static method 3400: Lcom/tayek/utilities/Utilities;.store (Ljava/io/Writer;Ljava/util/Properties;)V
12-20 23:02:14.849: D/dalvikvm(27907): VFY: replacing opcode 0x71 at 0x000f
12-20 23:02:14.849: I/dalvikvm(27907): Could not find method com.tayek.utilities.Utilities.store, referenced from method com.tayek.qanda.Model.toPropertiesFile
12-20 23:02:14.849: W/dalvikvm(27907): VFY: unable to resolve static method 3400: Lcom/tayek/utilities/Utilities;.store (Ljava/io/Writer;Ljava/util/Properties;)V
12-20 23:02:14.849: D/dalvikvm(27907): VFY: replacing opcode 0x71 at 0x0014
12-20 23:02:14.929: I/System.out(27907): Hospital Mortality Risk
12-20 23:02:14.969: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:14.969: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:14.969: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:14.989: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.029: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.029: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.040: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.160: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.160: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.160: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.169: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.169: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.169: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.189: D/gralloc_goldfish(27907): Emulator without GPU emulation detected.
12-20 23:02:15.258: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0
12-20 23:02:15.299: W/Trace(27907): Unexpected value from nativeGetEnabledTags: 0

更新:导入带有普通类的 jar 可以正常工作。

最佳答案

如果您使用的是 Java 7,您可以尝试更改 Java 库项目的运行时环境:

  1. 右键单击项目 -> 属性 -> Java 构建路径 -> 库

  2. 选择JRE系统库[JavaSE-1.7]并点击编辑

  3. 更改执行环境为JavaSE-1.6 (jre7)

这对我使用 ADT 21 很有效。

关于android adt 17 - 将 jar 添加到项目 - dexedlibs 中的 jar/仅包含 list ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13756873/

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