简体   繁体   中英

Android App Development Beginner

I am a rookie in Android. Tried to create an android project for an app that displays a simple "Hello World!" message. However when I run the Run the code, it shows the below 18 errors :

ActionBarActivity cannot be resolved to a type

ActionBarActivity cannot be resolved to a type

ActionBarActivity cannot be resolved to a type

error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

error: Error retrieving parent for item: No resource found that matches the given name error: Error retrieving parent for item: No resource found that matches the given name

R cannot be resolved to a variable
R cannot be resolved to a variable
R cannot be resolved to a variable R cannot be resolved to a variable R cannot be resolved to a variable

The import android.support.v7 cannot be resolved
The import android.support.v7 cannot be resolved

The method getMenuInflater() is undefined for the type Droid2Activity

The method getSupportFragmentManager() is undefined for the type Droid2Activity

The method onCreate(Bundle) of type Droid2Activity must override or implement a supertype method

The method onCreateOptionsMenu(Menu) of type Droid2Activity must override or implement a supertype method

The method onOptionsItemSelected(MenuItem) of type Droid2Activity must override or implement a supertype method

FYI I am using eclipse Indigo SR2. And have installed Android API15. Please let me know how to go about this and get them resolved.

Thanks and Regards, Manoj Naik

I had the same problem. When I ran the SDK Manager, as FeatheredOrican suggested, it indicated that the support library was installed but it was out of date. Updating it fixed the issue.

You have to add the support library to your project

1.Download support library from SDK Manager

2.Right click project in eclipse -> add support library

Compatibility issues may occur I recommend Updating to Keplar

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