<?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="wrap_content">
<ImageView
android:id="@+id/imageNew"
android:layout_width="50dip"
android:layout_height="50dip"
android:src="@drawable/icon"
android:scaleType="centerCrop"/>
</LinearLayout>
这是我的新布局文件,它没有被 eclipse 检测到,也不在 R 文件中。我无法创建任何新的布局文件,或者我做错了。我所有的旧布局都很好。
编辑:
此外,我之前创建的布局已使用新 ID 进行编辑,但是也未检测到新 ID。
最佳答案
清理你的项目或者重启eclipse,我猜是eclipse自动构建的问题。
关于Android xml 布局文件未添加到 R.java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7999930/