android studio 2.2 preview1,Android Studio 2.2 Preview 1 Rendering Problems

在尝试Android Studio 2.2 Preview时,用户遇到旧版项目布局无法正常渲染的问题。具体表现为资源未找到错误,特别是包含其他布局的文件。当删除include语句时,布局可以正常渲染,但一旦添加回include,就会出现找不到包含项的错误。问题主要出现在使用merge标签的布局中,移除merge并替换为其他布局标签则能正常工作。用户已尝试清理和重建项目,但问题依然存在。
摘要由CSDN通过智能技术生成

I'm trying out the new Android Studio 2.2 Preview, and for some reason the layout editor isn't working for layouts that were created in the old version. It keeps telling me various resources aren't found... (Such at the file that I just opened.)

Am I missing something? Is there soemthing I'm unaware of that I should have done when opening an old project?

It seems to be fine when I create a new layout. It's only the previously created layouts and menus that seem to have an issue.

Anyone else experiencing this?

I've tried cleaning, and rebuilding the project.

EDIT

Ok interesting- the problem seems to only happen for layouts that include other layouts. If I remove the include statement it renders fine, but if I add it back, it can't find the included item and gives me an issue. (Even though I can apparently open the included layout itself, and it renders just fine...)

UPDATE

Apparently it only seems to happen with the merge tag. If the layout being included uses the merge tag it won't render and I get the below error. If I remove the merge, and just use another layout tag it seems to work fine.

android.content.res.Resources$NotFoundException: Could not find layout resource matching value 0x7FFF03A2 (resolved name: item_monster_edit) in current configuration.

at android.content.res.Resources_Delegate.throwException(Resources_Delegate.java:913)

at android.content.res.Resources_Delegate.throwException(Resources_Delegate.java:900)

at android.content.res.Resources_Delegate.getLayout(Resources_Delegate.java:437)

at android.content.res.Resources.getLayout(Resources.java:1111)

at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:136)

at android.view.LayoutInflater.parseInclude(LayoutInflater.java:902)

at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:854)

at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)

at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)

at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)

at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)

at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)

at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)

at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)

at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)

at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)

at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)

at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)

at android.view.LayoutInflater.inflate(LayoutInflater.java:518)

at android.view.LayoutInflater.inflate(LayoutInflater.java:397)

at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:317)

at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429)

at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389)

at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:549)

at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:534)

at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966)

at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:534)

at com.android.tools.idea.rendering.RenderTask.lambda$inflate$41(RenderTask.java:660)

at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:380)

at com.android.tools.idea.rendering.RenderTask.inflate(RenderTask.java:660)

at com.android.tools.idea.uibuilder.model.NlModel.inflate(NlModel.java:321)

at com.android.tools.idea.uibuilder.model.NlModel.render(NlModel.java:378)

at com.android.tools.idea.uibuilder.surface.DesignSurface$3.modelChanged(DesignSurface.java:794)

at com.android.tools.idea.uibuilder.model.NlModel.lambda$notifyListenersModelUpdateComplete$52(NlModel.java:454)

at java.lang.Iterable.forEach(Iterable.java:75)

at com.android.tools.idea.uibuilder.model.NlModel.notifyListenersModelUpdateComplete(NlModel.java:454)

at com.android.tools.idea.uibuilder.model.NlModel.updateModel(NlModel.java:368)

at com.android.tools.idea.uibuilder.model.NlModel$1.run(NlModel.java:231)

at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:333)

at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:323)

at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:267)

at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:282)

at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234)

at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)

at com.intellij.util.Alarm$Request$1.run(Alarm.java:378)

at com.intellij.util.Alarm$Request.run(Alarm.java:389)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:227)

at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:187)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值