<?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文件檢測到。我無法創建任何新的佈局文件,或者我做的都是錯的。我所有的舊版面都可以看到。Android xml佈局文件沒有被添加到R.java
編輯:
另外,我創造了一個佈局以前我有一個新的ID修改,但是這也不會被檢測到新的ID。
做一個乾淨的項目可能會重啓eclipse。 –
哈哈,一個簡單的解決方案。發佈作爲答案,我會檢查它:) – Adam
http://stackoverflow.com/questions/9170827/why-is-my-custom-layout-file-not-recognized 而不是android.R只是使用R ... – Exile