-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken android setup #53
Comments
Hello! It seems like the NDK release 23 removed the AR tool that is required for For now, try reverting your NDK version through Android Studio to some earlier version. I've tested with 22.1.7171670 and it appears to be working. Of course eventually, we should probably add support for NDK>=23 but for now this should be a functional workaround. |
Hai! The NDK now uses llvm-ar in the same folder |
How can i change cargo mobile to target this instead? |
a workaround is to create a symlink to all needed file: export YOUR_ARCH_TYPE=linux-x86_64
# aarch64-linux-android-ar
ln -s $NDK_HOME/toolchains/llvm/prebuilt/$YOUR_ARCH_TYPE/bin/llvm-ar $NDK_HOME/toolchains/llvm/prebuilt/$YOUR_ARCH_TYPE/bin/aarch64-linux-android-ar
# arm-linux-androideabi-ar
ln -s $NDK_HOME/toolchains/llvm/prebuilt/$YOUR_ARCH_TYPE/bin/llvm-ar $NDK_HOME/toolchains/llvm/prebuilt/$YOUR_ARCH_TYPE/bin/arm-linux-androideabi-ar
# i686-linux-android-ar
ln -s $NDK_HOME/toolchains/llvm/prebuilt/$YOUR_ARCH_TYPE/bin/llvm-ar $NDK_HOME/toolchains/llvm/prebuilt/$YOUR_ARCH_TYPE/bin/i686-linux-android-ar
# x86_64-linux-android-ar
ln -s $NDK_HOME/toolchains/llvm/prebuilt/$YOUR_ARCH_TYPE/bin/llvm-ar $NDK_HOME/toolchains/llvm/prebuilt/$YOUR_ARCH_TYPE/bin/x86_64-linux-android-ar (the folder YOUR_ARCH_TYPE is most probably the only folder in |
I seem to have had a bad android studio setup on my computer for years from only occasionally having react native gigs and can't figure out how to fix it.
After some toiling I think I have a working installation but can't run a cargo mobile generated project. It works just fine on desktop and iOS simulator (without legacy build system even!) and am getting the following error:
The file is indeed not in the folder it is looking in but I do see some
-as
files.Could it be that I have upgraded beyond supported android studio? 😭 I don't know much about the build system or what I'm looking for but I did see this page saying certain things related to standalone toolchains are obsolete when googling things related to the error above.
Any help would be appreciated. I'm excited to finally be digging into a project with this tool!
The text was updated successfully, but these errors were encountered: