<?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>
This is my new layout file and it is not being detected by eclipse, nor is it in the R file. I can't create any new layout files or perhaps I'm doing it all wrong. All my older layouts are seen fine.
EDIT:
Also, a layout I had created previously I have edited with a new ID, however that new id is not detected either.
I had the same issue. I took Eclipse's advice and removed
import android.R;
And replaced all references to R
with the fully qualified name [project-specific package].R
since the R file was actually being generated under some package, and the default contained nothing of interest.
You can check the package name by looking in the gen folder.
Clean your project or restart the eclipse, i guess it's the problem with eclipse automatic building.
Look to the imports, the R imported maybe is not correct.
I have this import
import android.R;
I've deleted this and layout is working again
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With