-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
In a nut shell:
~/dev/rust-android-examples/na-mainloop]$ cargo apk build
Using package `na-mainloop` in `/home/tommd/dev/rust-android-examples/na-mainloop/Cargo.toml`
Error: No such file or directory (os error 2)
This is after a system setup which I tried to capture:
- Have rustup and java jdk:
$ nix-shell -p jdk -p rustup
- Download the 'commandline only' tools (https://developer.android.com/studio) and use sdkmanager to get the sdk
unzip thing and cd in then
$ export ANDROID_HOME=$(pwd)
$ $ANDROID_HOME/bin/sdkmanager --sdk_root=$ANDROID_HOME --install "build-tools;34.0.0" "cmdline-tools;latest" "extras;android;m2repository" "ndk;26.1.10909125" "platforms;android-31"
(Notice the 'ANDROID_SDK_HOME' envvar is deprecated, contrary to the readme)
- Download the NDK (https://developer.android.com/ndk/downloads)
unzip thing and cd
$ export ANDROID_NDK_HOME=$(pwd)
$ rustup default 1.70.0
$ rustup target install aarch64-linux-android
$ git clone https://github.com/rust-mobile/rust-android-examples
$ cd rust-android-examples/na-mainloop
$ cargo install cargo-ndk
$ cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build
$ cargo install cargo-apk
$ cargo apk build
Using package `na-mainloop` in `..../dev/rust-android-examples/na-mainloop/Cargo.toml`
Error: No such file or directory (os error 2)
Metadata
Metadata
Assignees
Labels
No labels