can't import a simple rive animation in my flutter app

49 Views Asked by At

I am really struggling to import a single Rive animation into my Flutter app, and it doesn't work! I really don't know what to do... Please help me!

Here is the Rive file I downloaded and added to my assets, and I got all the dependencies of Rive too:

https://rive.app/community/5103-10277-handshake/

so enter image description here

here is the my code:

enter image description here

I literally tried everything, but I don't know where the problem is. In step 9, I can't see any animation!

Here are the errors that I get with the phone emulator:

here are the error that i get with phone emulator : enter image description here enter image description here

2

There are 2 best solutions below

2
Pratik Lakhani On

add this line in app level build.gradle

android {
    ndkVersion "25.1.8937393"
}

The NDK version 25.1.8937393 can be install manually by going into android studio -> SDK manager -> SDK tools. Select the show package detail checkbox.

You will be able to see all the NDK versions available.

More details: https://developer.android.com/studio/projects/install-ndk

If it's helpful to you, then accept the answer and don't forget to upvote.

0
Munsif Ali On

add this line in app level build.gradle

android {
    ndkVersion "25.1.8937393"
}