Skip to content

Commit 5e4d837

Browse files
committed
Add Android Studio related docs
1 parent 7ddd415 commit 5e4d837

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

examples/demo-apps/android/LlamaDemo/SDK-quick-setup-guide.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Guide to set up Java/SDK/NDK for Android
22

3+
Follow this doc if you haven't set up Java/SDK/NDK for Android development
4+
already.
5+
This doc provides a CLI tutorial to set them up. Usually, you can do the same
6+
thing with Android Studio GUI.
7+
38
## Set up Java 17
49
1. Download the archive from Oracle website.
510
Make sure you have read and agree with the terms and conditions from the website before downloading.
@@ -69,3 +74,21 @@ export ANDROID_HOME="$(realpath $DEV_HOME/sdk)"
6974
# The NDK root is then under `ndk/<version>`.
7075
export ANDROID_NDK="$ANDROID_HOME/ndk/25.0.8775105"
7176
```
77+
78+
### (Optional) Android Studio Setup
79+
If you want to use Android Studio and never set up Java/SDK/NDK before, or if
80+
you use the newly installed ones, follow these steps to set Android Studio to use
81+
them.
82+
83+
Copy these output paths to be used by Android Studio
84+
```bash
85+
echo $ANDROID_HOME
86+
echo $ANDROID_NDK
87+
echo $JAVA_HOME
88+
```
89+
90+
Open a project in Android Studio. In Project Structure (File -> Project
91+
Structure, or `⌘;`) -> SDK Location,
92+
* Set Android SDK Location to the path of $ANDROID_HOME
93+
* Set Android NDK Location to the path of $ANDROID_NDK
94+
* Set JDK location (Click Gradle Settings link) -> Gradle JDK -> Add JDK... to the path of $JAVA_HOME

0 commit comments

Comments
 (0)