5

Unable to run the flutter application due to the following exception

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rive_common:buildCMakeDebug[arm64-v8a]'.
> Build command failed.
  Error while executing process /home/toku/Android/Sdk/cmake/3.18.1/bin/ninja with arguments {-C /home/toku/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/rive_common-0.0.1/android/.cxx/Debug/2c2j2ru1/arm64-v8a rive_text}
  ninja: Entering directory `/home/toku/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/rive_common-0.0.1/android/.cxx/Debug/2c2j2ru1/arm64-v8a'
  [1/63] Building CXX object CMakeFiles/rive_text.dir/home/toku/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/rive_common-0.0.1/ios/rive-cpp/src/rive_counter.cpp.o
  FAILED: CMakeFiles/rive_text.dir/home/toku/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/rive_common-0.0.1/ios/rive-cpp/src/rive_counter.cpp.o 
  In file included from /home/toku/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/rive_common-0.0.1/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:59:
  /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);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm using flutter version 3.3.10, rive: ^0.10.0,

I've done flutter clean flutter pub cache repair

Ken White
  • 123,280
  • 14
  • 225
  • 444
ToKu404
  • 61
  • 4
  • try this https://stackoverflow.com/questions/70149507/flutter-build-failed-for-android-bitmapexternalnativebuilddebug – Adelina Dec 27 '22 at 15:09
  • I am also facing this when I installed flutter with the help of FVM in windows, does anyone have a solution for that ?? – Yogesh Chawla Jan 19 '23 at 11:13

2 Answers2

3

Use

rive: ^0.9.1

this is the most stable rive package version

0

We had this same problem and after some time we found out that the problem was in the project directory. It contained a space which the charset changes to the % character. We removed the space and the problem was solved.

user/source/main project

to

user/source/main_project