I tried deploying Libgdx to html using gradle. I copied the content
html/build/dist
and all I see in the browser is the badlogic image with a red background (what you would see if you just created a project) Why is that?
Using the superdev I can open it in the browser, i see where it says drag this button but can't play it. there's nothing
The code server is ready at http://127.0.0.1:9876/
GET /clean/html
Cleaning disk caches.
Cleaned in 29ms.
GET /superdev.html
[WARN] ignored get request: /superdev.html
[WARN] not handled: /superdev.html
> Building 91% > :html:superDev^C%
turning the dev mod on I see Can't find any GWT Modules on this page.
If I build it normally, I see some warnings about depreciated methods, it builds successfully.
Assets aren't being loaded by html
I've few links that may be help you :
How to start Super Dev mode in GWT
Also check this thread https://stackoverflow.com/a/24265470/3445320
EDIT
I've tested on Android Studio with MacOS
Steps :
Run ./gradlew html:clean
to clean your html module
./gradlew html:superDev
commandThe code server is ready at http://127.0.0.1:9876/
on terminal http://127.0.0.1:9876/
in adress field -> enterDev Mode On
and Dev Mode Off
, two buttonsDev Mode On
to bookmarks bar, that is below my Address barDev Mode On
button that is in bookmarks bar, I got option for compileNow I need to deploy my html project
I run ./gradlew html:dist
in Android Studio Terminal
I got BUILD SUCCESSFUL
in Terminal then I find dist
folder inside my html module.
dist folder is inside
html module -> build -> dist
I copied dist
folder and deployed to my server.
EDIT 2
Make sure badlogic.jpg
is in your assets folder of android module
Check entry in assets.txt
file and find badlogic.jpg
inside html module->war->assets
folder. If file or entry not exist.
Somehow program not able to write in assets folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With