调试 flutter 应用程序任务 ':rive_common:buildCMakeDebug[arm64-v8a]' 执行失败时出现问题

问题描述 投票:0回答:1

我在调试 Flutter 应用程序时遇到问题: 这些是我的依赖项:

  cupertino_icons: ^1.0.6
  awesome_dialog: ^3.2.1
  logger: ^2.2.0
  provider: ^6.1.2
  intl: ^0.19.0
  bluetooth_print: ^4.3.0
  flutter_svg: ^2.0.10+1
  dropdown_button2: ^2.3.9
  expansion_tile_card: ^3.0.0
  pinput: ^4.0.0
  shared_preferences: ^2.2.3
  jwt_decoder: ^2.0.1
  jumping_dot: ^0.0.6
  rive_common: ^0.4.7
  http: any

这是我运行 flutter run 时遇到的错误:

PS C:\Users\HP\Downloads\test\flutter_application_1> flutter run          
Launching lib\main.dart on sdk gphone x86 in debug mode...
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

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 `C:\Users\HP\AppData\Local\Pub\Cache\hosted\pub.dev\rive_common-0.4.7\android\.cxx\Debug\p2o102m4\arm64-v8a'
  [1/1] Linking CXX shared library C:\Users\HP\Downloads\test\flutter_application_1\build\rive_common\intermediates\cxx\Debug\p2o102m4\obj\arm64-v8a\librive_text.so
  FAILED: C:/Users/HP/Downloads/test/flutter_application_1/build/rive_common/intermediates/cxx/Debug/p2o102m4/obj/arm64-v8a/librive_text.so
  cmd.exe /C "cd . && C:\Users\HP\AppData\Local\Android\Sdk\ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --sysroot=C:/Users/HP/AppData/Local/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -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 -DWITH_RIVE_AUDIO_TOOLS -DWITH_RIVE_AUDIO -DMA_NO_RESOURCE_MANAGER -DHAVE_OT -DHB_NO_FALLBACK_SHAPE -DHB_NO_WIN1256 -DHB_NO_EXTERN_HELPERS -DHB_NO_CFF -DHB_NO_BUFFER_VERIFY -DHB_NO_BUFFER_MESSAGE -DHB_NO_PAINT -DHB_NO_MMAP -DHB_NO_META -DYOGA_EXPORT= -std=c++11 -fno-limit-debug-info  -static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--gc-sections -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,librive_text.so -o C:\Users\HP\Downloads\test\flutter_application_1\build\rive_common\intermediates\cxx\Debug\p2o102m4\obj\arm64-v8a\librive_text.so @CMakeFiles\rive_text.rsp  && cd ."
  ld: error: undefined hidden symbol: OT::cff2::accelerator_t::get_extents(hb_font_t*, unsigned int, hb_glyph_extents_t*) const
  >>> referenced by hb-subset-plan.cc:1019 (C:/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/rive_common-0.4.7/ios/harfbuzz/src/hb-subset-plan.cc:1019)
  >>>               CMakeFiles/rive_text.dir/C_/Users/HP/AppData/Local/Pub/Cache/hosted/pub.dev/rive_common-0.4.7/ios/harfbuzz/src/hb-subset-plan.cc.o:(_update_instance_metrics_map_from_cff2(hb_subset_plan_t*))
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.

  C++ build system [build] failed while executing:
      @echo off
      "C:\\Users\\HP\\AppData\\Local\\Android\\sdk\\cmake\\3.18.1\\bin\\ninja.exe" ^
        -C ^
        "C:\\Users\\HP\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\rive_common-0.4.7\\android\\.cxx\\Debug\\p2o102m4\\arm64-v8a" ^
        rive_text
    from C:\Users\HP\AppData\Local\Pub\Cache\hosted\pub.dev\rive_common-0.4.7\android

* 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 46s
Running Gradle task 'assembleDebug'...                             47.4s
Error: Gradle task assembleDebug failed with exit code 1
PS C:\Users\HP\Downloads\test\flutter_application_1> 

我想要解决方案来修复此错误。我尝试更改很棒的 dilog 版本和 River 版本。但我得到了同样的错误。我使用 flutter clean 进行清理并尝试了很多次来解决这个问题。

flutter dart cmake android-gradle-plugin
1个回答
0
投票

我没有明确的解释,但回滚到以前的版本,然后再回到上一个版本。 以某种方式修复了错误

© www.soinside.com 2019 - 2024. All rights reserved.