Compose Preview in Android Studio does not work
@ErikUggeldahl is already working on this.
Since Sep 22, 2025.
Assessment
This issue has not been assessed yet.
Description
Description
If we use RiveUI() in our Composables, and check out the preview in Android Studio, the preview cannot render, and crashes.
java.lang.ClassNotFoundException: android.opengl.EGL14
at java.lang.ClassLoader.loadClass at java.lang.ClassLoader.loadClass at app.rive.core.CommandQueue.<init> ...
(CommandQueue.kt:434)
Provide a Repro
Just add any RiveUI() in your Composable:
val riveFileResult by rememberRiveFile(RiveFileSource.RawRes(R.raw.your_rive_animation))
if (riveFileResult is Result.Success) {
val riveFile = (riveFileResult as Result.Success<RiveFile>).value
RiveUI(
file = riveFile
)
}
Expected behavior
Preview should show the Rive animaton in its initial state. At least just show a blank view, and not crash the whole Composable preview.
- Dominant language
- Kotlin
- Stars
- 542
- Forks
- 66
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from rive-app/rive-android
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
rive-app/rive-android#475 ·
-
Difficulty 3/5 Half a day Newbie friendliness 74/100
rive-app/rive-android#474 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
rive-app/rive-android#472 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
rive-app/rive-android#471 ·
-
SIGSEGV in libGLESv2_mtk.so on FCNT arrows We2 devicesPossibly taken @ErikUggeldahl claimed this 16 days ago. Openbug confirmed
Difficulty 4/5 3-5 days Newbie friendliness 30/100
rive-app/rive-android#468 · 5 comments · 3 reactions · 1 assignee ·
All issues in rive-app/rive-android
Similar issues
-
[Submission] 抖音火山版Opensubmit-adaption submit-adaption-pre
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
BetterAndroid/android-notification-icon-project#744 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
utopia-rise/godot-jvm#1004 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
pedroSG94/RootEncoder#2213 ·
Maintainers usually reply within 2 days
-
coding good first issue size:xs skill:kotlin-core sub-issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
SKaiNET-developers/SKaiNET#1323 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day