【问题标题】:Flutter Execution Failed for task app:externalNativeBuildDebug Exception | Flutter任务应用程序的 Flutter 执行失败:externalNativeBuildDebug 异常 |扑
【发布时间】:2021-11-28 07:39:40
【问题描述】:

我的项目在以前版本的颤振中运行良好,但更新颤振后,我的项目没有运行并且出现构建失败异常。控制台的错误是这样的

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /home/murali/Android/Sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /home/murali/myproject/android/app/.cxx/cmake/debug/armeabi-v7a --target api_util}
  [1/2] Building CXX object 'CMakeFiles/api_util.dir/home/murali/myproject/ios/Classes/api_util.cpp.o'
  FAILED: /home/murali/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  --target=armv7-none-linux-androideabi21 --gcc-toolchain=/home/murali/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/murali/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -Dapi_util_EXPORTS  -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security   -O0 -fno-limit-debug-info  -fPIC -MD -MT 'CMakeFiles/api_util.dir/home/murali/myproject/ios/Classes/api_util.cpp.o' -MF CMakeFiles/api_util.dir/home/murali/myproject/ios/Classes/api_util.cpp.o.d -o 'CMakeFiles/api_util.dir/home/murali/myproject/ios/Classes/api_util.cpp.o' -c "/home/murali/myproject/ios/Classes/api_util.cpp"
  /bin/sh: 1: Syntax error: "(" unexpected
  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 18s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

【问题讨论】:

    标签: flutter dart flutter-dependencies flutter-web


    【解决方案1】:

    通过在 SDK Manger 中添加 Android NDK 20.1.5948944 并取消选中所有其他 NDK 解决了该问题

    【讨论】:

      猜你喜欢
      • 2021-07-13
      • 2020-06-13
      • 2020-10-14
      • 2022-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-01
      • 2021-09-26
      相关资源
      最近更新 更多