简体   繁体   English

在哪里创建资产文件夹LibGDX And​​roid Studio

[英]Where to create the assets folder LibGDX Android Studio

I'm creating a game with android studio + libgdx, but it crashes with this logcat: 我正在使用android studio + libgdx创建游戏,但此logcat导致崩溃:

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: bubbles.png

I'm following a tutorial, and it says to put the image in the assets folder, which i don't have... 我正在遵循一个教程,它说将图像放在资产文件夹中,而我没有...

I'm using LibGDX 1.0.0 我正在使用LibGDX 1.0.0

In top of your studio select "Project" view, you will have your project structure. 在工作室顶部,选择“项目”视图,您将拥有项目结构。 Navigate to main directory. 导航到主目录。 If you do not see your assets folder, just right click on main and add a directory named "assets". 如果看不到资产文件夹,只需右键单击main并添加一个名为“ assets”的目录。

在此处输入图片说明

See this link for setting up your project: Using-libgdx-with-intellij-idea: linking-the-asset-directories 请参阅以下链接来设置您的项目: 使用-libgdx-with-intellij-idea:链接资产目录

Personally, I am a fan of solution 3 and place the assets folder in the root folder next to the core/android/desktop/web project folders. 就个人而言,我是解决方案3的支持者,并将资产文件夹放在core / android / desktop / web项目文件夹旁边的根文件夹中。

您可以在src/main/下创建资产文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM