渲染无法加载LayoutLib问题: [英] Rendering Problems Failed to load the LayoutLib:

查看:473
本文介绍了渲染无法加载LayoutLib问题:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

渲染问题无法加载LayoutLib:com.android.layoutlib.bridge.Bridge(详细信息)

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

org.jetbrains.android.uipreview.RenderingException: Failed to load the LayoutLib: com.android.layoutlib.bridge.Bridge
    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:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

屏幕

推荐答案

据<一个href=\"http://stackoverflow.com/questions/30095839/layout-$p$pview-rendering-problems-in-android-studioandroid-studio-1-2\">Layout preVIEW呈现在Android Studio中的问题(的Andr​​oid 1.2工作室)

试着改变使用低于code您的基本应用程序的主题 - 中的 RES /价值/ styles.xml

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

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
</style>

您也可以尝试切换preVIEW的API级别降低一个来自
  在preVIEW配置

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

我觉得也Canary版更新的Andr​​oid Studio来2.0测试版2可能解决问题。

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?

您也可以看一下这: Android Studio中呈现问题

编辑:在这些职位也检查解决方案:

Check also solutions in these posts:

在这篇文章<一个href=\"http://stackoverflow.com/questions/17933133/failed-to-load-the-layoutlib-com-android-layoutlib-bridge-bridge\">Failed加载LayoutLib:com.android.layoutlib.bridge.Bridge ,你会发现:

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

也许班级,不同的项目里相同的名称。

Possibly Classes With Identical names inside different projects.

我可能知道的问题。我只是重新架构我做了,我
  把它叫做数字2.大量的类具有相同的名称,而同样的
  方法,具有相同名称的内包。这似乎真的
  混淆了IDE和/或JRE。

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.

这篇关于渲染无法加载LayoutLib问题:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆