File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
examples/demo-apps/android/LlamaDemo Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Guide to set up Java/SDK/NDK for Android
2
2
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
+
3
8
## Set up Java 17
4
9
1 . Download the archive from Oracle website.
5
10
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)"
69
74
# The NDK root is then under `ndk/<version>`.
70
75
export ANDROID_NDK="$ANDROID_HOME/ndk/25.0.8775105"
71
76
```
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
You can’t perform that action at this time.
0 commit comments