Home

Awesome

Build Status Test Status Discord badge Twitter handle

Rive Android

Rive hero image

An Android runtime library for Rive.

The library is distributed through the Maven repository.

Table of contents

Rive overview

Rive is a real-time interactive design and animation tool that helps teams create and run interactive animations anywhere. Designers and developers use our collaborative editor to create motion graphics that respond to different states and user inputs. Our lightweight open-source runtime libraries allow them to load their animations into apps, games, and websites.

๐Ÿก Homepage

๐Ÿ“˜ Rive docs

๐Ÿ›  Rive Forums

Getting started

To get started with Rive Android, check out the following resources:

For more information, see the Runtime sections of the Rive help documentation:

Supported versions

Currently, this runtime library supports a minimum SDK version of 21, and the target SDK version is 34.

Examples

Check out the app/ folder to see an example application using the Rive Android runtime.

To run the example app set the app build variant to preview. In Android Studio, to select which build variant to build and run, go to Build > Select Build Variant and select a build variant from the menu.

The preview build variant makes use of the hosted Rive dependency. If you're looking to contribute, set the build variant to debug and see CONTRIBUTING.md for more information. Building this variant will require additional configuration and setup.

The example showcases a number of ways to manipulate Rives, including:

Awesome Rive

For even more examples and resources on using Rive at runtime or in other tools, checkout the awesome-rive repo.

Experimental features

The Rive renderer is available experimentally in 7.0.0.

Read more about the Rive Renderer here. Additional information on choosing a renderer for Rive's runtimes.

Your feedback is greatly appreciated during this stage and we'd love to hear from you!

To use the new Rive renderer you can specify the parameter in XML:

<app.rive.runtime.kotlin.RiveAnimationView
  app:riveRenderer="Rive"
  โ€ฆ />

Alternatively, specify the renderer when initializing Rive:

Rive.init(applicationContext, defaultRenderer = RendererType.Rive)

This default value can still be overriden via XML.

Contributing

We love contributions! Check out our contributing docs to get more details into how to run this project, the examples, and more all locally.

Issues

Have an issue with using the runtime, or want to suggest a feature/API to help make your development life better? Log an issue in our issues tab! You can also browse older issues and discussion threads there to see solutions that may have worked for common problems.

Known issues

After rive-android:6.0.0, CMake is building the library, and you might run into the following error when rive-android is used alongside other native libraries:

Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
   > 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
โ€ฆ

You can fix this by adding this in your build.gradle:

android {
  โ€ฆ
  packagingOptions {
      pickFirst "lib/x86/libc++_shared.so"
      pickFirst "lib/x86_64/libc++_shared.so"
      pickFirst "lib/armeabi-v7a/libc++_shared.so"
      pickFirst "lib/arm64-v8a/libc++_shared.so"
  }
  โ€ฆ
}

Breaking changes

9.0.0