简体   繁体   中英

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?

在此处输入图片说明

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 az 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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM