0

When I create a new project in android studio the Bundle file are showing error. code is

public class MainActivity extends ActionBarActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
} 
}

this code Bundle are not finding and show error is -Cannot resolve symbol 'Bundle' and '@Override' is not applicable to method.. what is missing in my android studio i don't know any suggestion any one..What is error..

Abhinav singh
  • 1,448
  • 1
  • 14
  • 31

1 Answers1

0

The reason probably is that support library is not added to the dependencies. If you are not working on Actionbar or if your are not targeting API < 11 then replace ActionbarActivity with Activity. It should start working. But if you really want to target lower api and work on actionbar then add support library to your dependency. you can do that by following this link : Add support library to Android Studio project

Community
  • 1
  • 1
Mohib Irshad
  • 1,940
  • 23
  • 18