I have started a new android studio project and on opening of the main activity, the design view shows this error and does not show the layout on the emulator:
org.jetbrains.android.uipreview.RenderingException: Failed to load the LayoutLib: com/android/layoutlib/bridge/Bridge : Unsupported major.minor version 52.0 at org.jetbrains.android.uipreview.LayoutLibraryLoader.load(LayoutLibraryLoader.java:90) at org.jetbrains.android.sdk.AndroidTargetData.getLayoutLibrary(AndroidTargetData.java:180) at com.android.tools.idea.rendering.RenderService.createTask(RenderService.java:166) at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$6.run(AndroidDesignerEditorPanel.java:475) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310) at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227) at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.Alarm$Request$1.run(Alarm.java:351) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:695)
What is the problem here? Thanks.
It depends on your version. Here is a better way: open project and right click on app then go to open module settings click on dependencies tab and then click + icon on right then click 1st option which is library dipendency choose your dependencies click ok.
A view that is useful for prototyping Views that will move in MotionLayout. A view that is useful for prototyping layouts. Added in 2.0. Basic view that can draw a label (by default the view id), along with diagonals. Useful as a temporary mock view while building up a UI.
Use FrameLayout, RelativeLayout or a custom layout instead. Those layouts will adapt to different screen sizes, whereas AbsoluteLayout will not. Definitely right. I recommend RelativeLayout since it keeps the view hierachy flat.
activity_main. xml: This file located in the res/layout folder. It defines what components to display and how to display them in referenced activity view. Double click this file, you can see the content in the right panel, it has a Design view and a Text view, you can click the bottom Design and Text tab to switch.
Do you see the little Android icon?
Not the one in the top toolbar, the one in the toolbar just below it. Click the little drop down triangle next to it and choose the correct API version!
That was all I needed to do. The rendering took a while to load but it actually worked and the error message disappeared.
You need to choose the correct API version.
Change your App theme in the theme options for DeviceDefault or DeviceDefault.Light. This may works.
Though I am not sure this might work. I found few links where people have faced same issue.
you have to choose a correct api level from the drop down. this is the link
Usually you get error: Unsupported major.minor version 52.0
If you have installed Android N, change Android rendering version with older one and the problem will disappear.enter image description here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With