Question

About two weeks ago I could make projects with absolutely no problems, but ever since I installed all the new tools from the SDK manager my projects give errors when I create a project. I have everything (required) on the SDK installed. Maybe i have something installed that is causing the errors. I just have no idea what is causing the errors. If someone knows what if causing the errors when I make an android project that would be excellent.

The errors in MainActivity.java when I create a project : enter image description here

Everything I have installed down to API 16 on the SDK : enter image description here

Was it helpful?

Solution

It's seems you have problem with android support library! First of all be sure that you check this library in extra section in sdk manager and have it there. Then be you sure you import that library as well as described in android developer website?! ( with all resources )

OTHER TIPS

I had the same problems some months ago. I had installed the eclipse plugin from android myself. So, after some lurking on google, I tried to install the original ADT bundle for windows http://developer.android.com/sdk/index.html?hl=sk -> I know its the same as the plugin, but it worked for me :-)

For future refrence if anyone has this problem it might possibly be a build problem in your library! appcompact_v7 for some reason is not adding the android-support.jar to my projects when created, which is giving me all kinds or errors.

How to add the support library from appcompact_v7:

first, right click on the project with the build problems and select properties, and it should open the Java Build Path. enter image description here

When the build path is opened click on Java Build Path tab and select Add JARs.. once that opens select your appcompact file and go to the libs file under it. it should have an android-support.jar select that and click OK. For some reason my eclipse had made two appcompact folders and only one of them had the correct support which is android-support-v7-appcompact.jar. enter image description here

This might not fix a specific build problem, but it fixed the library build problem I was having!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top