one-click_deploy.rst 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. .. _doc_one-click_deploy:
  2. One-click deploy
  3. ================
  4. What is one-click deploy?
  5. -------------------------
  6. One-click deploy is a feature that is available once a platform is properly
  7. configured and a supported device is connected to the computer. Since things can
  8. go wrong at many levels (platform may not be configured correctly, SDK may be
  9. incorrectly installed, device may be improperly configured, etc.), it's good to
  10. let the user know that it exists.
  11. After adding an Android export preset marked as Runnable, Godot can detect when
  12. a USB device is connected to the computer and offer the user to automatically
  13. export, install and run the project (in debug mode) on the device. This feature
  14. is called *one-click deploy*.
  15. .. note::
  16. One-click deploy is only available once you've added an export template
  17. marked as **Runnable** in the Export dialog. You can mark several export
  18. presets as runnable, but only one preset per platform may be marked as
  19. runnable. If you mark a second preset in a given platform as runnable, the
  20. other preset will no longer be marked as runnable.
  21. Supported platforms
  22. -------------------
  23. - **Android:** Exports the project with debugging enabled and runs it on the
  24. connected device.
  25. - Make sure to follow the steps described in :ref:`doc_exporting_for_android`.
  26. Otherwise, the one-click deploy button won't appear.
  27. - If you have more than one device connected, Godot will ask you which device
  28. the project should be exported to.
  29. - **HTML5:** Starts a local web server and runs the exported project by opening
  30. the default web browser.
  31. Support for more platforms such as iOS is planned.
  32. Using one-click deploy
  33. ----------------------
  34. - If deploying to Android, enable developer mode on your mobile device
  35. then enable USB debugging in the device's settings.
  36. - After enabling USB debugging, connect the device to your PC using an USB cable.
  37. - For advanced users, it should also be possible to use wireless ADB.
  38. - Make sure there is an export preset marked as **Runnable** for the target
  39. platform (Android or HTML5).
  40. - If everything is configured correctly and with no errors, platform-specific
  41. icons will appear in the top-right corner of the editor.
  42. - Click the button to export to the desired platform in one click.
  43. .. image:: img/remote_debug.webp
  44. .. _doc_one-click_deploy_troubleshooting:
  45. Troubleshooting
  46. ---------------
  47. Android
  48. ^^^^^^^
  49. If you can't see the device in the list of devices when running the
  50. ``adb devices`` command in a terminal, it will not be visible by Godot either.
  51. To resolve this:
  52. - Check if USB debugging is enabled *and authorized on the device*.
  53. Try unlocking your device and accepting the authorization prompt if you see any.
  54. If you can't see this prompt, running ``adb devices`` on your PC should make
  55. the authorization prompt appear on the device.
  56. - Try `revoking the debugging authorization <https://stackoverflow.com/questions/23081263/adb-android-device-unauthorized>`__
  57. in the device's developer settings, then follow the steps again.
  58. - Try using USB debugging instead of wireless debugging or vice versa.
  59. Sometimes, one of those can work better than the other.
  60. - On Linux, you may be missing the required
  61. `udev rules <https://github.com/M0Rf30/android-udev-rules>`__
  62. for your device to be recognized.