I have been working with the Android SDK in the Eclipse IDE and have run into a problem with the sample codes provided with the Android SDK.
I am trying to get the Notepad sample code (specifically the NoteEditor) to work and every single import in every class does not work and says that it cannot be resolved to a type. If I scroll down and import the android.jar file then all of the imports work but the variable R does not. I cannot find where R is used and don’t know exactly what it is.
Does anyone know if I am missing something like a library or why I would need to import android.jar every time. I would expect these sample projects to work right out of the box so I figured it is something I am doing wrong.
Thanks!
with the jar imported. Check the imports at the top of your Activity java file. Make sure that you are not importing {anything}.R Sometimes eclipse like to auto correct imports by importing android.R, or others and that will break your projects references to R’s members.