rive-react-native icon indicating copy to clipboard operation
rive-react-native copied to clipboard

Support for Turbo Module/new RN architecture on Android

Open anders-friis-topdk opened this issue 2 years ago • 9 comments

Description

When running on Android with newArchEnabled=true in gradle.properties, RiveReactNativeView shows on screen that: 'RiveReactNativeView' is not Fabric compatible yet. Rive I am trying to show a very simple Rive animation.

Versions:

  • react-native: 0.72.3
  • rive-react-native: 4.1.2
  • Gradle properties (android/gradle.properties):
    • newArchEnabled=true
    • hermesEnabled=true
    • android.useAndroidX=true
    • android.enableJetifier=true
    • reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
    • FLIPPER_VERSION=0.182.0
  • OS: Android minSdkVersion = 21

Expected behavior

  • Fabric/newArchEnabled should be supported on Android

Could be good to add status for the library to the '3rd party libraries - updates and requests' list here: https://github.com/reactwg/react-native-new-architecture/discussions/6

anders-friis-topdk avatar Jul 25 '23 10:07 anders-friis-topdk

Hi @anders-friis-topdk thanks for reporting. We just did a release that should resolve this, can you try with the latest v5.0.0?

HayesGordon avatar Jul 26 '23 19:07 HayesGordon

Hi @HayesGordon, thank you for a quick response and release! I just tried a couple of times with the new v5.0.0 but I couldn't get it to work. So I created a new test project and I ended up with the same result.

Here is what I did in the new test project:

  • Create new RN project with v. 0.72.3:
    • npx react-native@latest init RiveFabricTest
  • Setting in gradle.properties:
    • newArchEnabled=true
  • Add this in app/build.gradle:
    • implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
  • Add rive:
    • rive-react-native": "^5.0.0"
  • Add HTTP rive component from example project in App.tsx

I end up with the same error view: Screenshot_1690443607

Here is my new test project: RiveFabricTest.zip

anders-friis-topdk avatar Jul 27 '23 07:07 anders-friis-topdk

Hi @anders-friis-topdk thanks for taking a look into this.

Sorry I wasted your time. I was under the wrong impression for what was required for Fabric to work - it'll involve a few extra steps, and we also need to make sure it remains compatible with the old architecture.

We'll investigate adding support for this and I'll update here.

HayesGordon avatar Jul 27 '23 08:07 HayesGordon

Any news on this issue @HayesGordon ?

anders-friis-topdk avatar Sep 19 '23 12:09 anders-friis-topdk

@HayesGordon Any update on this?

AamirHafiez avatar Dec 14 '23 14:12 AamirHafiez

Same problem here.

BitBarrel avatar Feb 04 '24 14:02 BitBarrel

Long time passed since last update on this one. This is blocking our project from using new architecture on Android so it is quite important to us. Any news @HayesGordon ?

anders-friis-topdk avatar Feb 14 '24 10:02 anders-friis-topdk

with new arch doesn't work on ios either, version 6.2.3

patrikduksin avatar Feb 20 '24 18:02 patrikduksin

The React Native ecosystem is evolving, with a shift towards a new architecture. To stay current and ensure our library remains useful, it is essential that we adapt to this new architecture.

We hope for timely updates to support this transition effectively.

hyochan avatar May 20 '24 15:05 hyochan