gpt4 book ai didi

android - 没有可用于为平台 'armeabi-v7a' 构建的工具链

转载 作者:太空狗 更新时间:2023-10-29 13:59:01 26 4
gpt4 key购买 nike

运行示例 NDK 程序时 Native Audio在 Arch Linux 的 Android Studio 中,我收到以下错误:

Error:Execution failed for task ':app:compileNative-audio-jniArmeabi-v7aDebugSharedLibraryNative-audio-jniMainC'.
No tool chain is available to build for platform 'armeabi-v7a': - Tool chain 'ndk-clang' (Clang): Could not determine Clang version: failed to execute clang -dM -E -.

我该如何纠正这个错误?我是否需要制作工具链才能运行示例 ndk 程序?

最佳答案

两种解决方案:

1) 从 https://github.com/android-ndk/ndk/wiki 下载 ndk-r12 ,向下滚动到“current beta release”,并让你的 android studio 使用 native-audio/local.properties 文件中的那个版本

2) 按原样使用当前的 ndk,但从 native-audio/app/build.gradle 中注释掉以下内容
工具链 = 'clang'
然后它将使用 gcc 构建

感谢 ggfan answering this question in github

关于android - 没有可用于为平台 'armeabi-v7a' 构建的工具链,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37206416/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com