Android

Android studio cmake错误

2018-05-22  本文已影响0人  Aaglnny
Build command failed.
Error while executing 'C:\Software_Install_Files\Android\sdk\cmake\3.6.4111459\bin\cmake.exe' with arguments 
{-HD:\WorkSpace\AndroidProjects\NDK_Demo2\app -BD:\WorkSpace\AndroidProjects\NDK_Demo2\app\.externalNativeBuild\cmake\release\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=C:\Software_Install_Files\Android\sdk\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\WorkSpace\AndroidProjects\NDK_Demo2\app\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=C:\Software_Install_Files\Android\sdk\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=C:\Software_Install_Files\Android\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=14 -DCMAKE_CXX_FLAGS=}
-- Configuring incomplete, errors occurred!
CMake Error at C:/Software_Install_Files/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake:312 (message):
  Invalid Android ABI: armeabi.  (armeabi is no longer supported.  Use
  armeabi-v7a.)
Call Stack (most recent call first):
  C:/Software_Install_Files/Android/sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/CMakeDetermineSystem.cmake:98 (include)
  CMakeLists.txt
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Error:executing external native build for cmake D:\WorkSpace\AndroidProjects\NDK_Demo2\app\CMakeLists.txt

错误项 Invalid Android ABI: armeabi. (armeabi is no longer supported. Use
armeabi-v7a.)

解决方法:在module build.gradle添加如下代码

 ndk {
            abiFilters "armeabi-v7a", "x86"//指定ndk需要兼容的架构,去除armeabi
        }
上一篇 下一篇

猜你喜欢

热点阅读