Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The rendering library could not be initialized #2

Closed
yodyyyy opened this issue Apr 10, 2021 · 13 comments
Closed

The rendering library could not be initialized #2

yodyyyy opened this issue Apr 10, 2021 · 13 comments
Assignees

Comments

@yodyyyy
Copy link

yodyyyy commented Apr 10, 2021

com.android.tools.idea.layoutlib.RenderingException: The rendering library could not be initialized
	at com.android.tools.idea.layoutlib.LayoutLibraryLoader.loadImpl(LayoutLibraryLoader.java:91)
	at com.android.tools.idea.layoutlib.LayoutLibraryLoader.load(LayoutLibraryLoader.java:120)
	at org.jetbrains.android.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:182)
	at org.jetbrains.android.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:174)
	at com.android.tools.idea.rendering.RenderService$RenderTaskBuilder.lambda$build$2(RenderService.java:645)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)

image

From SO to fix this by disable new layout rendering engine but can't find this option in experimental settings.
Thank you

@myung-nyun
Copy link

so do i

@VamChao
Copy link

VamChao commented Apr 11, 2021

Me too.

@sedgwickz
Copy link

I encountered the same issue.

@dsa28s
Copy link
Owner

dsa28s commented Apr 11, 2021

Ok. I found this issue. The prebuilt android layoutlib native binary architecture is x86_64, but Runtime is arm64 architecture. (Simply, architecture is not match)

So, I working hard to rebuild layoutlib/libandroid_runtime.dylib from android fullsource for darwin-arm64 architecture. Please wait a little longer. Thank you.

@dsa28s dsa28s self-assigned this Apr 12, 2021
@VamChao
Copy link

VamChao commented Apr 12, 2021

Ok. I found this issue. The prebuilt android layoutlib native binary architecture is x86_64, but Runtime is arm64 architecture. (Simply, architecture is not match)

So, I working hard to rebuild layoutlib/libandroid_runtime.dylib from android fullsource for darwin-arm64 architecture. Please wait a little longer. Thank you.

非常感谢你的贡献,辛苦啦。

@dsa28s dsa28s mentioned this issue Apr 16, 2021
@dsa28s
Copy link
Owner

dsa28s commented Apr 16, 2021

https://github.com/dsa28s/android-studio-apple-m1/releases/tag/canary-14-2
Here is patched version of fixed this issue. Try it!

@VamChao
Copy link

VamChao commented Apr 17, 2021

So cool !!!

@dsa28s
Copy link
Owner

dsa28s commented Apr 17, 2021

@axlyody Please download patched version, and check this issue fixed.
If you check, I'll close the issue.

@savked
Copy link

savked commented Apr 17, 2021

@dsa28s I had to disable some "rendering sandbox" thing that popped up as an error when I first loaded the layout, and then it worked... After I disabled that, I got the pop up that said:
Screenshot 2021-04-17 at 14 11 42

@yodyyyy
Copy link
Author

yodyyyy commented Apr 17, 2021

@axlyody Please download patched version, and check this issue fixed.
If you check, I'll close the issue.

Nice 👍
Thank you

@dsa28s dsa28s closed this as completed Apr 19, 2021
@kofi-k
Copy link

kofi-k commented Sep 16, 2021

https://github.com/dsa28s/android-studio-apple-m1/releases/tag/canary-14-2
Here is patched version of fixed this issue. Try it!

How do I implement this in my android studio?

@ghost
Copy link

ghost commented Feb 13, 2022

Ok. I found this issue. The prebuilt android layoutlib native binary architecture is x86_64, but Runtime is arm64 architecture. (Simply, architecture is not match)

So, I working hard to rebuild layoutlib/libandroid_runtime.dylib from android fullsource for darwin-arm64 architecture. Please wait a little longer. Thank you.

Hey there
I am trying to port android studio to linux arm64. i am halfway done in my work. I am also facing this same issue. can you tell me how you built this lib for darwin?
so i can follow the process to make for linux arm64
thanks

@victorwads
Copy link

Hey @dsa28s i'm runing Android Studio inside my Android Tablet, with a Linux Aarch64 sideload on my Android.

Everything that i had to user, except the ComposePreview is working.

Probally if i rebuild this Layout Like for aarch64 will solve the problem. But i never did that before. i got the SDK build tools 33.0.3 aarch64 from another gut that knows how to build native thing.

Can u help me with this?

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

No branches or pull requests

8 participants