Rendering Problems Failed to load the LayoutLib:

前端 未结 2 1757
庸人自扰
庸人自扰 2021-02-14 22:08

Rendering Problems Failed to load the LayoutLib: com.android.layoutlib.bridge.Bridge (Details)

org.jetbrains.android.uipreview.RenderingException: Failed to load         


        
2条回答
  •  一个人的身影
    2021-02-14 22:46

    According to Layout preview rendering problems in android studio(Android Studio 1.2)

    Try changing your base application theme using below code - in res/values/styles.xml

    
    

    OR

    Also you can try Switching the preview's API level to lower one from the preview configuration

    enter image description here

    I think also updating your Android Studio to 2.0 Beta 2 by Canary channel might solve a problem.

    If still doesn't work try to run your app on device - is layout here displaying properly?

    You may also read this: Android Studio rendering problems

    EDIT: Check also solutions in these posts:

    In this post Failed to load the LayoutLib: com.android.layoutlib.bridge.Bridge you would find:

    Possibly Classes With Identical names inside different projects.

    I might know the issue. I just recreated a framework I made, and I called it number 2. A lot of the classes had the same name, and same method, inside packages of the same name. This seemed to really confuse the IDE and/or JRE.

    I was able to sort of fix the problem, by making sure they weren't both being imported inside the same project! It is still giving me strange warnings, but it seems to be working correctly. What I would ultimately suggest if this is the case, would be to remove the duplicates from the project all together.

提交回复
热议问题