Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Android Studio Dolphin can not preview #448

Open
simplepeng opened this issue Sep 20, 2022 · 5 comments
Open

Android Studio Dolphin can not preview #448

simplepeng opened this issue Sep 20, 2022 · 5 comments

Comments

@simplepeng
Copy link

java.lang.IllegalStateException: context.cacheDir must not be null
	at com.opensource.svgaplayer.SVGACache.onCreate(SVGACache.kt:39)
	at com.opensource.svgaplayer.SVGACache.onCreate(SVGACache.kt:33)
	at com.opensource.svgaplayer.SVGAParser.<init>(SVGAParser.kt:29)
	at com.opensource.svgaplayer.SVGAImageView.parserSource(SVGAImageView.kt:94)
	at com.opensource.svgaplayer.SVGAImageView.loadAttrs(SVGAImageView.kt:87)
	at com.opensource.svgaplayer.SVGAImageView.<init>(SVGAImageView.kt:63)
	at com.opensource.svgaplayer.SVGAImageView.<init>(SVGAImageView.kt:24)
	at com.opensource.svgaplayer.SVGAImageView.<init>(SVGAImageView.kt)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:351)
	at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:200)
	at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:161)
	at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:294)
	at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:417)
	at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:428)
	at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:332)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
	at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1127)
	at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1101)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:686)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:505)
	at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:359)
	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)
@Moonwing2020
Copy link

have you work it out?

@sergiofdomingues
Copy link

sergiofdomingues commented Oct 18, 2022

My AS Dolphin won't show preview either....

@appcoderandroid2
Copy link

Have anyone got the solution? I am also stuck in the same issue

@tankai2525
Copy link

tankai2525 commented Dec 5, 2022

Me too, I don't know what to do

The following classes could not be instantiated:
- com.opensource.svgaplayer.SVGAImageView (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.

@W-quan
Copy link

W-quan commented Dec 20, 2022

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants