rive-app / rive-app/rive-android
Unresolved reference 'viewModelInstance' on Android with Manual Linking in Decoupled Setup
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 538
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
Description
Hello Rive Team 👋,
I am integrating rive-react-native into a decoupled Android application where the React Native bundle is loaded at runtime. While this setup works perfectly for our iOS app using autolinking, I am facing challenges with the manual linking process required for our Android architecture.
My current approach leads to a build-time dependency issue, and I'm seeking guidance on the correct procedure for manual linking in this environment. I suspect I might be missing a required dependency or a configuration step.
Problem Details
When syncing the project with Gradle after setting up the manual link, the build fails with an Unresolved reference: viewModelInstance error. The IDE cannot locate the necessary import, and I could not find information on this specific dependency in the documentation.
Steps Taken
- Installed the library in the React Native module using npm install rive-react-native.
- Manually copied the native source code from node_modules/rive-react-native/android/ into my native Android project's app/src/ folder.
- Added the native Rive dependency to the app-level build.gradle file. I have tested with multiple versions:
implementation 'app.rive:rive-android:10.4.1' // Also tried 9.6.5 - Attempted to sync the project with Gradle.
- Found the issue with the viewModelnstance issue
Expected behavior
It should work as i have manually linked it
Screenshots
- Files from the node_module from the react native
- issue in the file
Device & Versions (please complete the following information)
Android SDK API Level 35
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the manually copied sources under node_modules/rive-react-native/android/ and the corresponding files in app/src/, focusing on the unresolved viewModelInstance reference. Review the app-level build.gradle dependency and compare it with the native source requirements, then run a Gradle sync; done means the Android project builds successfully with the manual link.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100