fatal error: 'asm/types.h' file not found #include <asm/types.h>

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /Users/aaa/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/aaa/Documents/redpacket/app/.externalNativeBuild/cmake/debug/armeabi-v7a --target qssq666x}
  [1/2] Building CXX object src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o
  FAILED: /Users/aaa/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/aaa/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/aaa/Library/Android/sdk/ndk-bundle/sysroot  -Dqssq666x_EXPORTS -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/android/support/include -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -Wno-error=format-security -Wno-error=pointer-sign -O0 -fno-limit-debug-info  -fPIC -fvisibility=hidden -MD -MT src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o -MF src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o.d -o src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o -c /Users/aaa/Documents/redpacket/app/src/main/cpp/qssq666x.cpp
  In file included from /Users/aaa/Documents/redpacket/app/src/main/cpp/qssq666x.cpp:2:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string:470:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string_view:169:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/__string:56:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/algorithm:641:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/cstring:61:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string.h:61:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/string.h:36:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/strcasecmp.h:33:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/sys/types.h:36:
  /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/linux/types.h:21:10: fatal error: 'asm/types.h' file not found
  #include <asm/types.h>
           ^~~~~~~~~~~~~
  1 error generated.
  ninja: build stopped: subcommand failed.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
42 actionable tasks: 12 executed, 30 up-to-date
:app:externalNativeBuildDebug
Build qssq666x armeabi-v7a
[1/2] Building CXX object src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o
FAILED: /Users/aaa/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/aaa/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/aaa/Library/Android/sdk/ndk-bundle/sysroot  -Dqssq666x_EXPORTS -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/android/support/include -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -Wno-error=format-security -Wno-error=pointer-sign -O0 -fno-limit-debug-info  -fPIC -fvisibility=hidden -MD -MT src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o -MF src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o.d -o src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o -c /Users/aaa/Documents/redpacket/app/src/main/cpp/qssq666x.cpp
In file included from /Users/aaa/Documents/redpacket/app/src/main/cpp/qssq666x.cpp:2:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string:470:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string_view:169:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/__string:56:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/algorithm:641:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/cstring:61:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string.h:61:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/string.h:36:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/strcasecmp.h:33:
In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/sys/types.h:36:
/Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/linux/types.h:21:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
         ^~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
:app:externalNativeBuildDebug FAILED
:app:buildInfoGeneratorDebug

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /Users/aaa/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/aaa/Documents/redpacket/app/.externalNativeBuild/cmake/debug/armeabi-v7a --target qssq666x}
  [1/2] Building CXX object src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o
  FAILED: /Users/aaa/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/aaa/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/aaa/Library/Android/sdk/ndk-bundle/sysroot  -Dqssq666x_EXPORTS -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/android/support/include -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -Wno-error=format-security -Wno-error=pointer-sign -O0 -fno-limit-debug-info  -fPIC -fvisibility=hidden -MD -MT src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o -MF src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o.d -o src/main/cpp/two/CMakeFiles/qssq666x.dir/__/qssq666x.cpp.o -c /Users/aaa/Documents/redpacket/app/src/main/cpp/qssq666x.cpp
  In file included from /Users/aaa/Documents/redpacket/app/src/main/cpp/qssq666x.cpp:2:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string:470:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string_view:169:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/__string:56:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/algorithm:641:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/cstring:61:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/string.h:61:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/string.h:36:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/bits/strcasecmp.h:33:
  In file included from /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/sys/types.h:36:
  /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/linux/types.h:21:10: fatal error: 'asm/types.h' file not found
  #include <asm/types.h>
           ^~~~~~~~~~~~~
  1 error generated.
  ninja: build stopped: subcommand failed.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
42 actionable tasks: 12 executed, 30 up-to-date

`

网上有解决方法,插入几句话搞定. 出现问题在mac电脑.
https://stackoverflow.com/questions/44793617/android-ndk-error-asm-types-h-not-found
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值