Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Android Studio
Android Studio è un IDE gratuito per lo sviluppo su Android creato da Google e JetBrains. È basato su IntelliJ IDEA e dispone di un editor ricco di funzionalità che supporta Java e C/C++. Si può utilizzare per lavorare sia sul motore principale di Godot, sia sul codice base della piattaforma Android.
Importare il progetto
Dalla finestra di benvenuto di Android Studio seleziona Open.
Finestra di benvenuto di Android Studio.
Navigare a
<cartella radice di Godot>/platform/android/javae selezionare il filesettings.gradle.Android Studio importerà e indicizzerà il progetto.
Disposizione del progetto in Android Studio
Il progetto è organizzato attraverso i moduli di Android Studio:
lib module:
Located under
<Godot root directory>/platform/android/java/lib, this is a library module that organizes the Godot java and native code and make it available as a reusable Android library.The generated Godot Android library is made available for other Android modules / projects via MavenCentral, along with its documentation.
editor module:
Located under
<Godot root directory>/platform/android/java/editor, this is an application module that holds the source code for the Android and XR ports of the Godot Editor.This module has a dependency on the lib module.
app module:
Located under
<Godot root directory>/platform/android/java/app, this is an application module that holds the source code for the Android build templates.This module has a dependency on the lib module.
Compilazione e debug del modulo editor
Per compilare il modulo
editor:Selezionare il menu a discesa Run/Debug Configurations e selezionare
editor.
Selezionare Run > Run 'editor' dal menu in alto oppure cliccare sull'icona Esegui.
Per effettuare il debug del modulo
editor:Aprire la finestra Build Variants attraverso View > Tools Windows > Build Variants dal menu in alto.
In the Build Variants window, make sure that in the Active Build Variant column, the
:editorentry is set to one of the Debug variants.
Aprire la finestra Run/Debug Configurations cliccando su Run > Edit Configurations... nel menu in alto.
Nella finestra Run/Debug Configurations , selezionare la voce
editore in Debugger assicurarsi che Debug Type sia impostato suDual (Java + Native)Click the
+sign under the Symbol Directories section, and add theplatform/android/java/lib/libs/tools/debugdirectory.
Selezionare Run > Debug 'editor' dal menu in alto oppure cliccare sull'icona Debug.
Compilazione e debug del modulo app
The app module requires the presence of a Godot project in its assets directory (<Godot root directory>/platform/android/java/app/src/main/assets) to run.
This is usually handled by the Godot Editor during the export process.
While developing in Android Studio, it's necessary to manually add a Godot project under that directory to replicate the export process.
Once that's done, you can follow the instructions below to run/debug the app module:
Per compilare il modulo
app:Selezionare il menu a discesa Run/Debug Configurations e selezionare
app.
Selezionare Run > Run 'app' dal menu in alto oppure cliccare sull'icona Esegui.
Per effettuare il debug del modulo
app:Aprire la finestra Build Variants attraverso View > Tools Windows > Build Variants dal menu in alto.
In the Build Variants window, make sure that in the Active Build Variant column, the
:appentry is set to one of the Debug variants.
Aprire la finestra Run/Debug Configurations cliccando su Run > Edit Configurations... nel menu in alto.
Nella finestra Run/Debug Configurations, selezionare la voce
appe in Debugger assicurarsi che Debug Type sia impostato suDual (Java + Native)Click the
+sign under the Symbol Directories section, and add theplatform/android/java/lib/libs/debugdirectory.
Selezionare Run > Debug 'app' dal menu in alto oppure cliccare sull'icona Debug.
Se ci si imbatte in qualsiasi problema, chiedere aiuto in uno dei canali di sviluppo per Android di Godot.