gpt4 book ai didi

android - 如何使用 Intellij IDEA 构建和运行默认的 libgdx 游戏?

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

我是 Intellij IDEA 和 libgdx 的新手,我之前在 android studio 上工作过(它是在 Intellij 上构建的)所以它非常相似。

当我尝试构建默认的 libgdx android 项目时,它失败并出现以下错误:

    Error:Android Source Generator: Error: Can't find bundle for base name messages.AndroidJpsBundle, locale en_US
java.util.MissingResourceException: Can't find bundle for base name messages.AndroidJpsBundle, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1573)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
at org.jetbrains.jps.android.AndroidJpsBundle.getBundle(AndroidJpsBundle.java:22)
at org.jetbrains.jps.android.AndroidJpsBundle.message(AndroidJpsBundle.java:32)
at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.runAaptCompiler(AndroidSourceGeneratingBuilder.java:971)
at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.doBuild(AndroidSourceGeneratingBuilder.java:210)
at org.jetbrains.jps.android.AndroidSourceGeneratingBuilder.build(AndroidSourceGeneratingBuilder.java:114)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1314)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:991)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1063)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:954)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:787)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:376)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:183)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:308)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:137)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:235)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

我做了什么:

第一。使用 Libgdx 项目生成器生成项目:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

<强>2。在IntelliJ IDEA Community edition 2008.1中打开项目 enter image description here

项目结构:

enter image description here

我还将 android 模块设置的 Module SDK 更改为 Android API 25: enter image description here

然后我为应用程序添加构建和调试配置: enter image description here

现在,当我使用配置运行我的应用程序时,我收到了我在本文开头指定的错误...

Error:Android Source Generator: Error: Can't find bundle for base name messages.AndroidJpsBundle, locale en_US

enter image description here

我做错了什么,我应该怎么做才能解决这个问题?

最佳答案

我需要做的就是将我的 Intellij IDEA IDE 更新到最新版本,这修复了它,我认为这是他们修复的东西,android sdk 和 libgdx 与 Intellij 之间的一些兼容性问题。

Intellij IDEA 之后还问我要不要升级android SDK 和工具,所以我也更新了SDK。

我打开 Intellij IDEA 并选择“帮助”>“检查更新”,更新后它就起作用了。

关于android - 如何使用 Intellij IDEA 构建和运行默认的 libgdx 游戏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49811732/

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