mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-08 12:52:46 +00:00
AndroidSetup: Update documentation
This commit is contained in:
parent
4f849ec827
commit
52c551226e
@ -6,21 +6,29 @@ If you'd like to contribute to the Android project, but do not currently have a
|
||||
|
||||
* [Android Studio](https://developer.android.com/studio/)
|
||||
|
||||
If you downloaded Android Studio, install it with the default options and open the project located in `dolphin/Source/Android`
|
||||
Install Android Studio with the default options if you do not already have it.
|
||||
|
||||
## Setting Up Android Studio
|
||||
|
||||
1. Wait for background tasks to complete on the bottom of the window.
|
||||
2. Launch the Android SDK Manager by clicking on its icon in Android Studio's main toolbar:
|
||||
![Android Studio Package Icon][package-icon]
|
||||
3. Install or update the SDK Platform. Choose the API level as defined in the app module's [build.gradle](Source/Android/app/build.gradle#L7) file.
|
||||
4. Install a CMake version as defined in the app module's [build.gradle](Source/Android/app/build.gradle#L99) file. The option won't appear until you select `Show Package Details`.
|
||||
5. Select `Build Variants` on the left side of the window to choose the build variant and ABI you would like to compile for the `:app` module.
|
||||
6. Select the green hammer icon in the main toolbar to build and create the apk in `Source/Android/app/build/outputs/apk`
|
||||
1. Open the `Source/Android` project in Android Studio, let any background tasks finish, and Android Studio will automatically download the required SDK components and tooling.
|
||||
2. Use the hammer icon or **Build > Assemble 'app' Run Configuration** to compile the `:app` module, then choose **Build > Generate App Bundles or APKs > Generate APKs** to produce the APK in `Source/Android/app/build/outputs/apk`.
|
||||
|
||||
## Import the Dolphin code style
|
||||
|
||||
The project maintains a custom IntelliJ/Android Studio style file to keep Java and Kotlin formatting consistent.
|
||||
|
||||
* Go to **File > Settings > Editor > Code Style** (or **Android Studio > Settings > Editor > Code Style** on macOS).
|
||||
* Click the gear icon and choose **Import Scheme**.
|
||||
* Select `Source/Android/code-style-java.xml` from the repository.
|
||||
* Ensure that Dolphin-Java is selected.
|
||||
|
||||
## Format code before opening a pull request
|
||||
|
||||
Before committing or submitting a pull request, reformat any Java or Kotlin files you modified:
|
||||
|
||||
* Use **Code > Reformat Code** (or press `Ctrl+Alt+L`/`⌥⌘L` on macOS) with the Dolphin code style selected.
|
||||
* Re-run formatting after edits to keep spacing, imports, and wrapping consistent with the rest of the project.
|
||||
|
||||
## Compiling from the Command-Line
|
||||
|
||||
For command-line users, any task may be executed with `cd Source/Android` followed by `gradlew <task-name>`. In particular, `gradlew assemble` builds debug and release versions of the application (which are placed in `Source/Android/app/build/outputs/apk`).
|
||||
|
||||
[package-icon]: https://i.imgur.com/hgmMlsM.png
|
||||
[code-style]: https://i.imgur.com/3b3UBhb.png
|
||||
|
||||
Loading…
Reference in New Issue
Block a user