0

Trying to use Rive package in flutter app. This is causing me an error that I cant seem to resolve. Earlier it wanted me to re-install ndk which I did and now it concerns CMAKE This is the stacktrace.

Launching lib/main.dart on Redmi Note 9 Pro in debug mode...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rive_common:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /home/aman/Desktop/Android_Sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /home/aman/.pub-cache/hosted/pub.dartlang.org/rive_common-0.0.3/android/.cxx/cmake/debug/armeabi-v7a rive_text}
  ninja: Entering directory `/home/aman/.pub-cache/hosted/pub.dartlang.org/rive_common-0.0.3/android/.cxx/cmake/debug/armeabi-v7a'
  [1/1] Linking CXX shared library /home/aman/Desktop/fitness_app/build/rive_common/intermediates/cmake/debug/obj/armeabi-v7a/librive_text.so
  FAILED: /home/aman/Desktop/fitness_app/build/rive_common/intermediates/cmake/debug/obj/armeabi-v7a/librive_text.so 


 >>> referenced 1 more times
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  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 1m 39s
Running Gradle task 'assembleDebug'...                            100.5s
Exception: Gradle task assembleDebug failed with exit code 1

How do i resolve this issue? Also it worked just fine when I included rive package while the app was running on my device. It caused an error only when I detached the usb from the device and from then on, it hasn't run.

EDIT I tried running with --stacktrace and --info but it didnt help

➜  fitness_app git:(master) ✗ flutter run --stacktrace
Could not find an option named "stacktrace".


Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
➜  fitness_app git:(master) ✗ flutter run --info      
Could not find an option named "info".


Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options. 
Arjun Malhotra
  • 351
  • 2
  • 11
  • This is the problem with complex build systems. I suspect that `--info` is an option for ninja, not for flutter. So somehow you should tell flutter to use the --info option when invoking ninja. How you would do that I have no idea. – john Apr 23 '23 at 09:44
  • Apparently --info is an option for gradle, https://stackoverflow.com/questions/21674091/how-to-add-stacktrace-or-debug-option-when-building-android-studio-project – john Apr 23 '23 at 09:47

0 Answers0