Search code examples
javaandroideclipser.java-fileandroid-5.0-lollipop

No known package error. Android 5.0


I've been developing using the Android L preview. Today I've spent all day trying to set up eclipse so that I can develop using the new APIs. I've run into so many problems, and have hashed most out by just making a new workspace.

A persisting problem is the one shown below. These resources are in the R.java file and are in the resource folder. I haven't moved anything or changed anything about the project other that the target build sdk. The error is occurring any time I try to access a resource using the format R.XXX.XXXX. What could the reason be? Any ideas?

enter image description here


Solution

  • EDIT: NEW ANSWER Something was just bugging out. Not sure what, but after re-downloading the bundle, downloading API 21, restarting laptop etc etc my same project is running just fine. Hopefully this isn't temporary.

    Bundle: https://developer.android.com/sdk/index.html?hl=i

    PREVIOUS ANSWER: Some of my resources had digits in the filename.

    This doesn't seem to be documented. I found this by first trying to start from scratch, building up my app in a new project. This worked until I had to make a big jump, adding lots of activities at the same time due to dependencies, and this caused the same error to occur. I then starting bit by bit stripping down my app. Found that upon deleting those resources, the errors subsided.

    I thought that a-z and 0-9 were allowed. Files with these characters worked just fine in previous Android versions, but it seems that updates made when switching to Android 5.0 makes 0-9 invalid.

    Can anyone else confirm this?