Skip to content

Commit 42d683c

Browse files
authored
Update android.rst: add necessary preparation (#852)
1 parent 9434126 commit 42d683c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs/deploy/android.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,17 @@ App Build Instructions
9191
# e.g. for Linux: export JAVA_HOME=/home/user/Downloads/jdk-20
9292
export JAVA_HOME=/path/to/jdk
9393
94-
6. Build the libs for Android app and then copy the built files to the ``android/MLCChat/app/src/main/src/libs``:
94+
6. Install rustup if not yet installed. Run the command to install it.
95+
96+
.. code:: bash
97+
98+
# error
99+
# ./prepare_libs.sh: line 4: rustup: command not found.
100+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
101+
# and set up the PATH
102+
source "$HOME/.cargo/env"
103+
104+
7. Build the libs for Android app and then copy the built files to the ``android/MLCChat/app/src/main/src/libs``:
95105

96106
.. code:: bash
97107
@@ -104,9 +114,9 @@ App Build Instructions
104114
# libtvm4j_runtime_packed.so
105115
cp -a build/output/. MLCChat/app/src/main/libs
106116
107-
7. Open folder ``android/MLCChat`` as the project with Android Studio. And connect your Android device to your machine. In the menu bar of Android Studio, click ``Build - Make Project``.
117+
8. Open folder ``android/MLCChat`` as the project with Android Studio. And connect your Android device to your machine. In the menu bar of Android Studio, click ``Build - Make Project``.
108118

109-
8. Once the build is finished, click ``Run - Run 'app'``, and you will see the app launched on your phone.
119+
9. Once the build is finished, click ``Run - Run 'app'``, and you will see the app launched on your phone.
110120

111121
.. image:: https://github.com/mlc-ai/mlc-llm/raw/main/site/img/android/android-studio.png
112122

0 commit comments

Comments
 (0)