【发布时间】:2013-04-06 12:40:30
【问题描述】:
我刚刚在我的 android 项目中添加了一个新的 xml 文件并开始收到错误“R 无法解析为 多变的'。当我用谷歌搜索它以及堆栈溢出时,有很多问题和答案。当我清理项目时,会自动生成一个新的空文件夹,与我的资源文件夹('res')同名。
我也没有在我的 xml 文件中发现错误。我还发现生成的java文件夹是空的。 eclipse 中的所有项目都出现同样的错误。
可能是什么问题?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
提前感谢您的帮助。
【问题讨论】:
标签: android resources r.java-file generated