Rive Initializer
Initializes Rive; needs to be done at startup.
Either call this before the view is laid out:
AppInitializer.getInstance(applicationContext)
.initializeComponent(RiveInitializer::class.java)Content copied to clipboard
or declare a provider in your app's manifest:
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data android:name="app.rive.runtime.kotlin.RiveInitializer"
android:value="androidx.startup" />
</provider>Content copied to clipboard
Include this in your dependencies:
implementation "androidx.startup:startup-runtime:1.0.0"Content copied to clipboard
Alternatively, you can call Rive.init(context) once when your app starts up and before Rive is used. In fact, if you want to provide a custom renderer type you'll need to init Rive manually.