0

when in tried to edit a layout design in activity_main.axml this error won't let me to use palette or to show how layout looks like. enter image description here

this is the error when I click the details:

com.android.tools.idea.layoutlib.RenderingException: "C:\Users\Rachid\AppData\Local\Android\Sdk\platforms\android-30\data\fonts" directory cannot be found at com.android.tools.idea.layoutlib.LayoutLibraryLoader.loadImpl(LayoutLibraryLoader.java:55) at com.android.tools.idea.layoutlib.LayoutLibraryLoader.load(LayoutLibraryLoader.java:108) at org.jetbrains.android.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:179) at org.jetbrains.android.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:171) at com.android.tools.idea.rendering.RenderService$RenderTaskBuilder.lambda$build$1(RenderService.java:551) 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)

  • What control do you add in activity_main.axml? Do you want to use fonts in your project? – Cherry Bu - MSFT Apr 12 '21 at 05:47
  • Thanks for your comment. I didn't add no control and about fonts I noticed that fonts folder doesn't excite in android-30 folder and I have this problem even with new project the designer won't work – user15599613 Apr 12 '21 at 18:14
  • What is the version of your visual studio? Do you try to repair or update your visual studio? – Cherry Bu - MSFT Apr 15 '21 at 06:40

1 Answers1

0

I encountered the same issue as you from a fresh install of all my development environment. I have just tried with the new 2021.1.2 update and it seems the issue is now fixed.