渲染Android studio 2.3.3:文件不存在或不是文件

问题描述:

在Android Studio中渲染项目时遇到问题。它说一个文件不存在或不是一个文件,但它存在,它是一个文件。渲染Android studio 2.3.3:文件不存在或不是文件

我已经尝试了一切,将SDK级别降低到清单所说的级别。我也改变了主题,但没有任何反应,现在我甚至无法打开模拟器,它说它一直试图打开300秒。

请帮忙。我会附上照片。

This is the render problem

Here is the file that "doesn't exist" according to the problem

在清单中的SDK的版本是22,这就是我使用了一个:

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" /> 

这就是我所说的布局代码此文件:

android:id="@+id/lyHeader" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:background="@xml/header_color" 
android:paddingBottom="5dip" 
android:paddingTop="5dip" > 

而他再是该文件的内容:

<?xml version="1.0" encoding="utf-8"?> 
<shape xmlns:android="http://schemas.android.com/apk/res/android" > 
<solid android:color="#71A2C7" /> 
</shape> 
+0

最有可能的是,该文件不应该在'res/xml /'中。请编辑您的问题并发布该文件的内容以及您尝试使用它的布局资源。 – CommonsWare

+0

我在文件和内容资源中添加了我想要使用它的内容 – user8559076

+0

'res/xml /'用于定制XML或没有自己的专用资源类型的框架XML(例如,首选项,快捷方式,'FileProvider'元数据)。就你而言,你正在定义一个drawable。将该文件移动到'res/drawable-nodpi /',看看你是否有更好的运气。 – CommonsWare

你已经把绘制对象文件(文件包含shape标签)到xml文件夹,因此Android工作室interpretate它不正确。将它移动到drawable文件夹