CatherineKim
CatherineKim

Reputation: 119

I have some problems with ActionBarActivity in Android Studio

I'm trying a calendar apps in Android Studio.

I cloned it from github and now I have some problems.

I imported android.support.v7.app.ActionBarActivity but it keeps showing the message:

Cannot resolve symbol 'ActionBarActivity'

And there is also a warning message that says:

Can't start Git: D:\tests\simple\settings.gradle Probably the path to Git executable is not valid. Fix it.

How can I fix these problem? Please help me. enter image description here

Upvotes: 2

Views: 519

Answers (3)

akshay toshniwal
akshay toshniwal

Reputation: 310

Android has deprecated ActionBar. Instead, try to use ToolBar which gives you more flexibility than ActionBar and extend AppCompactActivity instead of ActionbarActivity. This will solve your problem for sure.

Upvotes: 0

Gabriele Mariotti
Gabriele Mariotti

Reputation: 365028

The ActionBarActivity is included in the AppCompat support Library.

To use it, you have to add the appcompat library in your project.

If you are using Android Studio, just add a dependency in your build.gradle

dependencies {
    // Support Libraries (it requires api 23 to compile)
    compile 'com.android.support:appcompat-v7:23.1.0'
}

If you are using Eclipse you can read this official link.

Also pay attention.
This class is deprecated.
Use AppCompatActivity instead.

Upvotes: 1

Daniel Zolnai
Daniel Zolnai

Reputation: 16920

If you have added your dependency to build.gradle, run a Gradle Sync. Also note the ActionBarActivity is deprecated, because it has been replaced by AppCompatActivity.

Upvotes: 0

Related Questions