0

I am developing an app in Android Studio version 1.2.1.1. In which I use minsdk 15 and I what to use GoogleMap but When i am adding compile 'com.google.android.gms:play-services:7.3.0' or compile 'com.android.support:appcompat-v7:22.1.1' in build.gradle. Then ActionBarActivity shows an error android.support.v7.app.actionbaractivity is deprecated.

I searched and found some suggestions to use AppCompatActivity instead of ActionBarActivity but it does not allow me to debug the application can anyone help me out in to resolve the error?

Thanks in advance

Aman Singh
  • 370
  • 1
  • 9

1 Answers1

3

Then ActionBarActivity shows an error android.support.v7.app.actionbaractivity is deprecated.

That is not an error. It is a warning. It is telling you that ActionBarActivity is deprecated.

If you look at the JavaDocs for ActionBarActivity, you will see:

This class is deprecated.

Use AppCompatActivity instead.

So, replace ActionBarActivity with AppCompatActivity, and you will resolve the deprecation warning.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Sir when i try to use AppComatActivity insted of ActionBarActivity, the application crashes every time. – Aman Singh May 26 '15 at 10:49
  • @AmanSingh: Then use LogCat to examine the Java stack trace associated with your crash: https://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this Or, leave it as `ActionBarActivity` for now, until you gain more experience in Android development and are in position to debug whatever problem you are experiencing. – CommonsWare May 26 '15 at 11:02