Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Compose Preview in Android Studio does not work

Open
#413 1 comment 0 reactions 1 assignee View on GitHub

@ErikUggeldahl is already working on this.

Since Sep 22, 2025.

Assessment

This issue has not been assessed yet.

Description

bug triage
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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rive-app/rive-android

All issues in rive-app/rive-android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.