Can't get Android ApiDemos to work in Eclipse

I feel a bit stupid since I develop android apps for a while now. My problem is that I can't get the ApiDemos to work with Eclipse. Please have a look at the screenshot of my errors I get in Eclipse:

It looks like it can't find the xml files in the ApiDemos project. Although everything looks fine to me. Any suggestions what I might be doing wrong?

Other (own) Android applications work fine in Eclipse. Thanks a lot for help.

-------------Problems Reply------------

The is an automatically generated file. It is updated/re-generated whenever layout files, etc are changed.

I'm going to assume you tried to set up the project directly from the samples. I've seen that cause issues with write access if you don't have the privileges, and it doesn't seem to play nice when I try it either.

One thing to try would be copying the relevant ApiDemos folder to an alternate location and then try creating a new android project from that folder as follows:

Create -> New Android Project -> Create Project From Existing Source

Then point it to the location and select the relevant SDK.

It's not ideal, but at least it might get the application generating and running possibly.

Do this: In Eclipse, File->New->Project, then either type the word "sample" in the filter text field or select Android->Android Sample Project and you will see all the projects such as ApiDemos, NotePad, etc.

Clean the project and build it again...I hope it would solve the issue

when you File->New->Other->Android Project from Existing Code, you have to tick "Copy projects into workspace".

got the same issue today :-(

this way gave me a solution very easy to use with ADT (eclipse) :

click on New Project icon --> Project --> Android --> Android Sample Project --> Next --> Select Target (for me Android 4.4) --> Next --> and then select the sample project you want to import in Eclipse (for me : legacy > ApiDemo) --> Finish

it works fine for me, i hope that could help someone :-)


Category:eclipse Views:0 Time:2011-07-01

Related post

Copyright (C), All Rights Reserved.

processed in 0.096 (s). 11 q(s)