gpt4 book ai didi

compiler-errors - 在Android Studio中编译Cocos 2d-x-3.15.1项目时发生错误

转载 作者:行者123 更新时间:2023-12-02 10:59:59 41 4
gpt4 key购买 nike

不知道如何解决cocos 2d-x-3.15.1的问题

 Warning:android-validator: Suspicious module dependency proj.android -> android: Android application module depends on other application module. Possibly, you should change type of module 'android' to 'Library' or change the dependency scope to 'Provided'.
Error:Android Pre Dex: [EngineDataManager.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:139)
Error:Android Pre Dex: [EngineDataManager.jar] Exception in thread "main" java.lang.NullPointerException
Error:Android Pre Dex: [EngineDataManager.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.main(AndroidDxRunner.java:336)
Error:Android Pre Dex: [EngineDataManager.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.loadDex(AndroidDxRunner.java:80)
Error:Android Pre Dex: [EngineDataManager.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:136)
Error:Android Pre Dex: [EngineDataManager.jar] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Error:Android Pre Dex: [EngineDataManager.jar] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
Error:Android Pre Dex: [EngineDataManager.jar] at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
Error:Android Pre Dex: [EngineDataManager.jar] at java.security.AccessController.doPrivileged(Native Method)
Error:Android Pre Dex: [EngineDataManager.jar] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
Error:Android Pre Dex: [EngineDataManager.jar] at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
Error:Android Pre Dex: [EngineDataManager.jar] Failed to load dx.jar
Error:Android Pre Dex: [EngineDataManager.jar] java.lang.ClassNotFoundException: com.android.dx.command.DxConsole

安装android studio 2.3.3比它仍然显示此错误像android studio 2.1.1一样。我不明白问题出在什么地方。请帮助我!!
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] Failed to load dx.jar
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:139)
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] Exception in thread "main" java.lang.NullPointerException
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.main(AndroidDxRunner.java:336)
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:136)
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.loadDex(AndroidDxRunner.java:80)
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
Error:Android Pre Dex: [httpclient-4.4.1.1.jar] java.lang.ClassNotFoundException: com.android.dx.command.DxConsole



Error Occur at the time of Compiling the project in android studio. Its showing some dx.jar file error and some error which are unable to understand it. So please help me out from this error!





Error:Android Pre Dex: [annotations.jar] at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
Error:Android Pre Dex: [annotations.jar] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
Information:05/07/2017 12:24 PM - Compilation completed with 13 errors and 0 warnings in 5s 253ms
Error:Android Pre Dex: [annotations.jar] Failed to load dx.jar
Error:Android Pre Dex: [annotations.jar] at java.security.AccessController.doPrivileged(Native Method)
Error:Android Pre Dex: [annotations.jar] java.lang.ClassNotFoundException: com.android.dx.command.DxConsole
Error:Android Pre Dex: [annotations.jar] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
Error:Android Pre Dex: [annotations.jar] at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
Error:Android Pre Dex: [annotations.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.loadDex(AndroidDxRunner.java:80)
Error:Android Pre Dex: [annotations.jar] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Error:Android Pre Dex: [annotations.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:136)
Error:Android Pre Dex: [annotations.jar] Exception in thread "main" java.lang.NullPointerException
Error:Android Pre Dex: [annotations.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.main(AndroidDxRunner.java:336)
Error:Android Pre Dex: [annotations.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:139)
Information:java: Some input files use unchecked or unsafe operations.
Information:java: Recompile with -Xlint:unchecked for details.
G:\Kunal\Gaming\cocos2d\cocos\platform\android\java\src\org\cocos2dx\lib\Cocos2dxSound.java

最佳答案

我有同样的问题。
遵循this解决方案并开始工作!

该解决方案适用于Ubuntu和OSX,但我确信它也适用于Windows。

关于compiler-errors - 在Android Studio中编译Cocos 2d-x-3.15.1项目时发生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44924614/

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