mac m1电脑Android Studio运行react native应用程序报错:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
用的Android12模拟器,NDK勾了下面这些
mac m1电脑Android Studio运行react native应用程序报错:
Execution failed for task ':app:stripDebugDebugSymbols'.
> No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
用的Android12模拟器,NDK勾了下面这些
引自免费微信小程序:皆我百晓生
这个问题是由于Android Studio在ARM-ELF架构上找不到正确的工具链导致的。为了解决这个问题,你需要确保在你的NDK安装目录下有一个名为arm-linux-androideabi
的工具链。
以下是解决此问题的步骤:
首先,打开终端(如果你使用的是Windows,请点击开始菜单并搜索“命令提示符”,然后右键选择“以管理员身份运行”)。
在终端中输入以下命令来更新你的NDK路径:
export ANDROID_NDK=/path/to/your/ndk
然后,进入你的项目文件夹,并编辑你的build.gradle
文件,找到android
标签下的defaultConfig
部分,并添加以下内容:
defaultConfig {
//...
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
保存并关闭文件。
重新启动Android Studio。
在Android Studio中,检查你的应用是否可以正常运行了。
以上就是解决Android Studio在React Native应用中遇到的错误的方法。希望这能帮到你!