Depreceated code

0 Robert Key · May 12, 2015
Not sure why I\'m getting ActionBarActivity strickthrough with the 'inspection reports where deprecated code is used in the specified scope'?

Code in MainActivity.java
---------
package com.robbie.myapplication1;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends ActionBarActivity {
--------
Thanks
r0b

Post a Reply

Replies

Oldest  Newest  Rating
+1 Nishant Kumar · June 4, 2015
Hey Dude visit this site that may help

https://developer.android.com/reference/android/support/v7/app/package-summary.html

in that go to ActionBarActivity in classes.
+1 Abhinav Moudgil · June 4, 2015
Well, that does not really affect the task that you are trying to do.
I also had the same issue but all at the end works fine. 

If you really want to remove this deprecation, this hack works: 

 http://stackoverflow.com/questions/29890530/actionbaractivity-is-deprecated-android-studio
+3 Suhas N · June 4, 2015
In the latest versions of Android ,you are suppose to inherit from AppCompatActivity instead of ActionBarActivity
So, try this. This will work. 

public class MainActivity extends AppCompatActivity{
//your code here

}
  • 1

Java / Android Development

107,001 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator