Reputation: 125
I'm currently learning LibGDX using Android Studio as my IDE, and I have a question regarding the code hot swapping
feature in the context of a project created with LibGDX.
I've noticed that when using the Android Launcher
in my project, I have the option to use the Apply Code Changes
and Apply Code Changes and Restart Activity
features, which allow me to quickly apply code changes without restarting the entire application. However, when I use the Desktop Launcher
, these features are not active. I would like to have the ability to use Apply Code Changes
and Apply Code Changes and Restart Activity
with the Desktop Launcher
, as it would be convenient for desktop testing.
I am using Android Studio Giraffe 2022.3.1, SDK 33, JBR 17 and LibGDX 1.12.0.
I would greatly appreciate any assistance or advice on this matter. Thank you!
Someone had previously asked about a similar issue, and they were told that "hot swap debugging does not appear to work when using the Gradle templat", but that was 9 years ago. There might have been some changes since then.
I've already examined all the settings and found only File
> Settings
> Build, Execution, Deployment
> Debugger
> HotSwap
. I've also attempted to use key combinations like Ctrl + Alt + F10 and Ctrl + F10, but none of these methods seem to work.
Upvotes: 3
Views: 466
Reputation: 4636
Hot Swap should work in the Desktop build, but you'll need to disable the Android Plugins for it to work. If you don't do this then you will get an Unable to delete directory
error.
Upvotes: 0