Skip to content

Commit ca2f264

Browse files
committed
Bring Android documentation up-to-date
1 parent d853da3 commit ca2f264

File tree

2 files changed

+20
-38
lines changed

2 files changed

+20
-38
lines changed

AndroidSetup.md

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,21 @@ If you'd like to contribute to the Android project, but do not currently have a
66

77
* [Android Studio](https://developer.android.com/studio/)
88

9-
If you downloaded Android Studio, extract it and then see [Setting Up Android Studio](#setting-up-android-studio).
9+
If you downloaded Android Studio, install it with the default options and open the project located in `dolphin/Source/Android`
1010

1111
## Setting Up Android Studio
1212

13-
1. Launch Android Studio, which will start a first-launch wizard.
14-
2. Choose a custom installation.
15-
3. If offered a choice of themes, select your preference.
16-
4. When offered a choice of components, uncheck the "Android Virtual Device" option. ![Android Studio Components][components]
17-
5. Accept all licenses, and click Finish. Android Studio will download the SDK Tools package automatically. (Ubuntu users, if you get an error running the `mksdcard` tool, make sure the `lib32stdc++6` package is installed.)
18-
6. At the Android Studio welcome screen, click "Configure", then "SDK Manager".
19-
7. Use the SDK Manager to get necessary dependencies, as described in [Getting Dependencies](#getting-dependencies).
20-
8. When done, follow the steps in [Readme.md](Readme.md#building-for-android) to compile and deploy the application.
21-
22-
## Executing Gradle Tasks
23-
24-
In Android Studio, you can find a list of possible Gradle tasks in a tray at the top right of the screen:
25-
26-
![Gradle Tasks][gradle]
27-
28-
Double clicking any of these tasks will execute it, and also add it to a short list in the main toolbar:
29-
30-
![Gradle Task Shortcuts][shortcut]
13+
1. Wait for background tasks to complete on the bottom of the window.
14+
2. Launch the Android SDK Manager by clicking on its icon in Android Studio's main toolbar:
15+
![Android Studio Package Icon][package-icon]
16+
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.
17+
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`.
18+
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.
19+
6. Select the green hammer icon in the main toolbar to build and create the apk in `Source/Android/app/build/outputs/apk`
3120

32-
Clicking the green triangle next to this list will execute the currently selected task.
21+
## Compiling from the Command-Line
3322

3423
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`).
3524

36-
## Getting Dependencies
37-
38-
Most dependencies for the Android project are supplied by Gradle automatically. However, Android platform libraries (and a few Google-supplied supplementary libraries) must be downloaded through the Android package manager.
39-
40-
1. Launch the Android SDK Manager by clicking on its icon in Android Studio's main toolbar:
41-
![Android Studio Package Icon][package-icon]
42-
2. Install or update the SDK Platform. Choose the API level selected as [compileSdkVersion](Source/Android/app/build.gradle#L4).
43-
3. Install or update the SDK Tools. CMake, LLDB, and NDK. If you don't use android-studio, please check out https://github.com/Commit451/android-cmake-installer.
44-
45-
In the future, if the project targets a newer version of Android, or uses newer versions of the tools/build-tools packages, it will be necessary to use this tool to download updates.
46-
47-
[components]: https://i.imgur.com/Oo1Fs93.png
48-
[package-icon]: https://i.imgur.com/NUpkAH8.png
49-
[gradle]: https://i.imgur.com/dXIH6o3.png
50-
[shortcut]: https://i.imgur.com/eCWP4Yy.png
25+
[package-icon]: https://i.imgur.com/hgmMlsM.png
26+
[code-style]: https://i.imgur.com/3b3UBhb.png

Contributing.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ If you make any contributions to Dolphin after December 1st, 2014, you are agree
77
- [Introduction](#introduction)
88
- [C++ coding style and formatting](#cpp-coding-style-and-formatting)
99
- [C++ code-specific guidelines](#cpp-code-specific-guidelines)
10-
- [Android and Java](#android-and-java)
10+
- [Android](#android)
1111
- [Help](#help)
1212

1313

@@ -272,9 +272,15 @@ Summary:
272272
};
273273
```
274274
275-
# <a name="android-and-java"></a>Android and Java
275+
# <a name="android"></a>Android
276276
277-
The Android project is currently written in Java. If you are using Android Studio to contribute, you can import the project's code style from `code-style-java.jar`, located in `[Dolphin Root]/Source/Android`. Please organize imports before committing.
277+
If you are using Kotlin, just use the built-in official Kotlin code style.
278+
279+
To install the Java code style in Android Studio, select the gear icon in the Code Style settings as shown, select `Import Scheme...` and select `dolphin/Source/Android/code-style-java.xml`. The Code Style menu should look like this when complete. ![Code Style Window][code-style]
280+
281+
You can now select any section of code and press `Ctrl + Alt + L` to automatically format it.
278282
279283
# <a name="help"></a>Help
280284
If you have any questions about Dolphin's development or would like some help, Dolphin developers use `#dolphin-emu @ irc.libera.chat` to communicate. If you are new to IRC, [Libera.Chat has resources to get started chatting with IRC.](https://libera.chat/)
285+
286+
[code-style]: https://i.imgur.com/3b3UBhb.png

0 commit comments

Comments
 (0)