Wednesday, April 24, 2013

[android help] Android xml layout file is not being added to R.java

Android xml layout file is not being added to R.java - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.



















android:layout_width="fill_parent"
android:layout_height="wrap_content">

android:id="@+id/imageNew"
android:layout_width="50dip"
android:layout_height="50dip"
android:src="@drawable/icon"
android:scaleType="centerCrop"/>







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.


























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.






















If ANYTHING is wrong in your layouts, new updates aren't added to the R file. Look at the errors panel, and possibly to a clean rebuild to see what errors are popping up.


Your layout xml is fine. The file itself may have an incompatible name.






















Probably problem in a name xml a file. The name shouldn't contain upper case symbols.






















I have this import


import android.R;


I've deleted this and layout is working again




















default






.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...