Android Preview Layout : Render Problem produce no layout preview

Open
#275 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, kotlin
Domain
mobile

Research direction

Start with RendererSkia.kt, RiveTextureView.kt, and RiveAnimationView.kt using the reported Android Studio layout preview stack trace. Reproduce the preview failure in the listed Android Studio and Windows environment, then verify that the layout preview renders without the UnsatisfiedLinkError.

Written by the indexing model from the issue text.

Description

Description

Is it normal that the preview layout in Android Studio crash with this error :

java.lang.UnsatisfiedLinkError: 'long app.rive.runtime.kotlin.renderers.RendererSkia.constructor(boolean)'
at app.rive.runtime.kotlin.renderers.RendererSkia.constructor(Native Method)
at app.rive.runtime.kotlin.renderers.RendererSkia.make(RendererSkia.kt:41)
at app.rive.runtime.kotlin.RiveTextureView.onAttachedToWindow(RiveTextureView.kt:62)
at app.rive.runtime.kotlin.RiveAnimationView.onAttachedToWindow(RiveAnimationView.kt:532)
at android.view.View.dispatchAttachedToWindow(View.java:20753)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3497)
at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:58)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:366)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:436)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:121)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:717)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$9(RenderTask.java:873)
at com.android.tools.idea.rendering.RenderExecutor$runAsyncActionWithTimeout$3.run(RenderExecutor.kt:192)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)

How can I resolve this problem ? Thanks

Screenshots

image

image

Versions

Android Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 30, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry:
ide.intellij.laf.enable.animation=true
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.balloon.shadow.size=0

Non-Bundled Plugins:
idea.plugin.protoeditor (213.6461.28)
com.softbank.robot.sdkplugin (1.5.3)
com.mallowigi.idea (16.0)
com.mallowigi (54.1.0)
com.thoughtworks.gauge (213.5744.125)
com.developerphil.adbidea (1.6.8)

Dominant language
Kotlin
Stars
538
Forks
66
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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.