You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tauri android dev doesn't work in a plain create-tauri-app out of the box on a real device (did not test emulator) because the app won't be able to connect to the localhost server
Reproduction
connect real device (didn't test emulator)
follow prereqs guide(s)
Create tauri app
tauri android init
tauri android dev
be sad :(
update vite's server.host setting to 0.0.0.0 and restart
be happy :)
Expected behavior
The templates should work out of the box, or the docs should mention the prereqs i may be missing.
this changes the `android dev` port forwarding (that is actually handled by the `android-studio-script` command - triggered by our Gradle plugin) with some enhancements:
- make the whole process more resilient by checking if the port was actually forwarded and rerunning the `adb reverse` command until it tells us the forward is ready
- if the `adb devices` list is empty, retry a few times (waiting a few seconds) to tolerate devices being booted - slows down "raw builds" (Build Project Android Studio menu for instance) that shouldn't happen often anyway - if you're running `android dev` you're usually running the app on a device instead of simply testing builds
Describe the bug
https://discord.com/channels/616186924390023171/986184094050316358/1285544267854647296
https://discord.com/channels/616186924390023171/1282867292216234006
tauri android dev
doesn't work in a plain create-tauri-app out of the box on a real device (did not test emulator) because the app won't be able to connect to the localhost serverReproduction
Expected behavior
The templates should work out of the box, or the docs should mention the prereqs i may be missing.
Full
tauri info
outputStack trace
No response
Additional context
https://discord.com/channels/616186924390023171/986184094050316358/1285544267854647296
https://discord.com/channels/616186924390023171/1282867292216234006
(same links as above)
p.s. i am not the only one with this issue but i think it's not an issue for everyone either (may be real device vs emulator then)
The text was updated successfully, but these errors were encountered: