2015-02-10 40 views
9

每當我嘗試運行我的LibGDX項目的桌面版本時,它會顯示「找不到badlogic.jpg」。我怎樣才能將資產文件夾從android連接到桌面?如何在libgdx中將資產從android連接到桌面?

我發現this post但我無法找到如何爲android工作室做到這一點。我試着只是複製資產文件夾,但不起作用。

+1

說明這裏:奏效https://github.com/libgdx/libgdx/wiki/Gradle-and-Intellij-IDEA – Tenfour04 2015-02-10 14:16:03

+0

好,謝謝。我忘了android工作室基本上只是intellij。 – 2015-02-11 14:48:42

+0

[New libgdx setup receive file not found]可能重複(http://stackoverflow.com/questions/22822767/new-libgdx-setup-receive-file-not-found) – 2016-10-27 21:40:44

回答

11

設置工作目錄路徑/安卓/運行桌面快速啓動

+0

具體來說,/mobile/src/main /資產(對於我有點老的項目) – 2015-06-26 04:47:50

+0

這個問題是當我使用'Gdx.files.local'時,它會使用相同的目錄並且搞砸了。 – 2016-02-22 19:36:03

15

當資產點擊Run -> Edit configurations...,然後更改「工作目錄」參數。點擊「應用」並再次運行。

enter image description here