2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 469 forks source link

Android issues running Flare #141

Open bremington opened 5 years ago

bremington commented 5 years ago

Hi, as I have moved my app into release build, everything is working great on iOS. For Android, it seems to work fine in Debug build, Release build has many issues. Most of the time it appears Android is having issues building the animations, and times out, where it does not display the animation at all. My app has completed the migration to Android X, so not sure if Flare supports this. I get this error from the pre launch report on Google Play Console with Flare:

**4 warnings identified The following APIs are greylisted and Google can’t guarantee that they will work on existing versions of Android. Some may be already be restricted for your target SDK

API Landroid/util/LongArray;->get(I)J 2 occurrences identified. Only unique stack traces are shown.

API Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J 2 occurrences identified. Only unique stack traces are shown.

API Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; 2 occurrences identified. Only unique stack traces are shown.

API Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J 2 occurrences identified. Only unique stack traces are shown.**

When I remove Flair these go away. So for now I have had to use static images instead of the Flair animations when I deploy Android.

Here is one of the animations I am using: https://www.2dimensions.com/a/bremington/files/flare/settings

luigi-rosso commented 5 years ago

Hi @bremington, thanks for reporting this. Flare doesn't directly invoke any of those APIs, so I suspect it's something Flutter is doing under the hood based on some other Dart APIs Flare is using. The Flare runtime is written entirely in Dart.

You mentioned that Android is having issues building animations and times out. I'm not sure I follow what's happening. Does the app boot up? If so, does the rest of the app work but the Flare animations do not? You mentioned "many issues." What other issues do you see?

You may have stumbled on something new or perhaps something is misconfigured in the Android X migration. I suspect it's related to Flutter however as Flare doesn't interface with any OS level APIs directly.

Could you share a sample project with your Android X configuration?

bremington commented 5 years ago

Ciao Luigi,

Well, not sure what exactly is going on, but I changed my minimum SDK to 26 (Android 8) from 21 and the API errors went away. My code was simply using intro_slider for an initial tutorial and included Flare animations in the 5 slides. For most of the Android devices the app ran, but would not show the animations. The only package used was Flare actor. I also just updated Flare to 1.5.7.

On Aug 28, 2019, at 2:15 PM, Luigi Rosso notifications@github.com wrote:

Hi @bremington https://github.com/bremington, thanks for reporting this. Flare doesn't directly invoke any of those APIs, so I suspect it's something Flutter is doing under the hood based on some other Dart APIs Flare is using. The Flare runtime is written entirely in Dart.

You mentioned that Android is having issues building animations and times out. I'm not sure I follow what's happening. Does the app boot up? If so, does the rest of the app work but the Flare animations do not? You mentioned "many issues." What other issues do you see?

You may have stumbled on something new or perhaps something is misconfigured in the Android X migration. I suspect it's related to Flutter however as Flare doesn't interface with any OS level APIs directly.

Could you share a sample project with your Android X configuration?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/2d-inc/Flare-Flutter/issues/141?email_source=notifications&email_token=AISMZJRLQBYUMWVIVHDLW6DQG26EJA5CNFSM4IRKAM62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5MAH7Y#issuecomment-525861887, or mute the thread https://github.com/notifications/unsubscribe-auth/AISMZJSGL7UDCNSDLDITSGDQG26EJANCNFSM4IRKAM6Q.