eclipse mainActivity.java and others lots of error on start

I am getting trouble with my eclipse. I'm not yet starting to code. just started making a android app project and errors are showing already.

problem tab

DZOGRAFI : i've tried what you answered , this is the result. T_T

Upvotes: 0

Views: 571

Answers (1)

dzografi
dzografi

Reputation: 31

[edit] By having a look at the problem tab and the project explorer window I am guessing there is something wrong with the appcompat_v7 library. It cannot be built for some reason.

So, first of all make sure that you actually want to use the v7 support library (Eclipse automatically imports the library when you start a new project using some features). I can see inside your MainActivity.java file that you are extending MainActivity from ActionBarActivity (which automatically imports android.support.v7.app.ActionBarActivity into your project). Extend from Activity instead if you don't actually need the ActionBarActivity class.

If you actually need the support library, keep one copy of it into your workspace (Delete the others) and check if it is updated to the latest version. Inside Eclipse go to Window->Android SDK Manager and scroll down to the extras folder. Check for newer versions of the Android Support Library. Additionally make sure you have downloaded the SDK platform for the latest APIs and the latest android SDK-Build Tools.

Here is my SDK Manager [edit]

Try removing the project (Right click ->Delete) and importing it again. Go to File->Import then select Android->Existing Android Code into Workspace and click Next. In the window that appears click Browse and go to your Android SDK Folder and look for [Android SDK Folder]\extras\android\support\v7\appcompat. The project should be checked for import and then click "Finish". Clean the appcompat project and then the one you are working on. Please make sure that you are building the appcompat project using the latest API Level (Inside the appcompat Properties->Android check the Android 6.0 Build Target)

Also make sure that in your project's properties you have set the appcompat project as a Library for your project.

enter image description here

After you have done those. Clean and Build the entire workspace and restart Eclipse. Hope this solves your problems

Upvotes: 1

Related Questions