Support for Turbo Module/new RN architecture on Android
Description
When running on Android with newArchEnabled=true in gradle.properties, RiveReactNativeView shows on screen that: 'RiveReactNativeView' is not Fabric compatible yet.
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
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?
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:
Here is my new test project: RiveFabricTest.zip
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.
Any news on this issue @HayesGordon ?
@HayesGordon Any update on this?
Same problem here.
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 ?
with new arch doesn't work on ios either, version 6.2.3
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.