【发布时间】:2016-09-27 06:40:11
【问题描述】:
我在 Android Studio 2.2 中创建项目时遇到问题
在尝试创建 xml 布局时,出现以下错误:
渲染问题 渲染过程中引发异常:找不到布局资源
这是我的 xml 代码 sn-p :
<ScrollView xmlns:android="schemas.android.com/apk/res/android"
xmlns:app="schemas.android.com/apk/res-auto"
xmlns:tools="schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent" android:orientation="vertical">
<include layout="@layout/app_bar" />...
我该如何解决这个问题?
【问题讨论】:
-
你试过刷新吗?什么是布局资源?你想在里面包含布局吗?
-
尝试刷新但不起作用。应用栏是布局资源。是的。
-
如果您忽略此错误并运行您的应用程序会发生什么?运行良好吗?
-
是的。它运行良好。
-
那么最好忽略此类错误,代码在设计时未编译,因此此类错误会显示在预览窗格中。
标签: android android-layout android-studio android-studio-2.2