如何解决 FAILURE:任务“:rive_common:buildCMakeDebug[arm64-v8a]”[已关闭]执行失败

How can I solve FAILURE: Execution failed for task ':rive_common:buildCMakeDebug[arm64-v8a]' [closed]

提问人:BANADDA MUBARAKA 提问时间:10/31/2023 最后编辑:user16217248BANADDA MUBARAKA 更新时间:10/31/2023 访问量:43

问:


编辑问题以包括所需的行为、特定问题或错误以及重现问题所需的最短代码。这将有助于其他人回答这个问题。

24 天前关闭。

我在尝试构建我的 flutter 应用程序时遇到了这个错误

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rive_common:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/android/.cxx/Debug/13194d4d/arm64-v8a'
  [1/64] Building CXX object CMakeFiles/rive_text.dir/home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/rive_counter.cpp.o
  FAILED: CMakeFiles/rive_text.dir/home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/rive_counter.cpp.o 
  /home/mcrops/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --sysroot=/home/mcrops/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Drive_text_EXPORTS -I../../../../../ios/harfbuzz/src -I../../../../../ios/rive-cpp/skia/renderer/include -I../../../../../ios/rive-cpp/include -I../../../../../ios/SheenBidi/Headers -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -DWITH_RIVE_TEXT -DHAVE_OT -DHB_NO_FALLBACK_SHAPE -DHB_NO_WIN1256 -std=c++11 -fno-limit-debug-info  -fPIC -MD -MT CMakeFiles/rive_text.dir/home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/rive_counter.cpp.o -MF CMakeFiles/rive_text.dir/home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/rive_counter.cpp.o.d -o CMakeFiles/rive_text.dir/home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/rive_counter.cpp.o -c /home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/rive_counter.cpp
  In file included from /home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/rive_counter.cpp:5:
  In file included from ../../../../../ios/rive-cpp/include/rive/rive_counter.hpp:8:
  In file included from ../../../../../ios/rive-cpp/include/rive/rive_types.hpp:12:
  /snap/flutter/current/usr/include/c++/9/memory:121:25: error: cast from pointer to smaller type 'uintptr_t' (aka 'unsigned int') loses information
    const auto __intptr = reinterpret_cast<uintptr_t>(__ptr);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  [2/64] Building CXX object CMakeFiles/rive_text.dir/home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/text/line_breaker.cpp.o
  FAILED: CMakeFiles/rive_text.dir/home/mcrops/.pub-cache/hosted/pub.dev/rive_common-0.2.7/ios/rive-cpp/src/text/line_breaker.cpp.o 


* 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 28s
Exception: Gradle task assembleDebug failed with exit code 1
Flutter 飞镖 异常 铆钉

评论


答:

1赞 Jitendra Kohar 10/31/2023 #1

这可能是因为缓存中的冲突, 尝试做这些事情,这肯定会解决问题:

  1. “flutter clean”,然后再次安装应用程序。
  2. 如果上述不起作用,请尝试删除位于iOS文件夹中的Pod文件,然后再次尝试安装应用程序。
  3. 确保您的飞镖版本与您正在使用的铆钉兼容。

评论

0赞 BANADDA MUBARAKA 10/31/2023
我试过了这个,但没有用
0赞 Jitendra Kohar 11/8/2023
在 3 点中,我已经提到了您的 rive 包与 dart SDK 的兼容性。
0赞 BANADDA MUBARAKA 10/31/2023 #2

经过长时间的调试,我能够通过从我的pubspec.yaml文件中删除这个包来解决这个错误。我仍然不确定为什么它会导致问题awesome_dialog: