1

I am apprentice to android but i have programming skills. I am following android app development tutorial unfortunately received below error while i'm developing a app. please help me to resolve this.

error

What i was tried so far :

  1. In project structure window i have changes 'compile SDK version to
    API 22: android 5.1 version.

  2. In flavors tab 'min sdk version to API 22.

but still i can see those errors in my coding. underlines in red color.

enter image description here

asela daskon
  • 496
  • 1
  • 8
  • 21

4 Answers4

2

AppCompat library version 23 requires compileSdkVersion 23.

Also, ActionBarActivity is deprecated, use AppCompatActivity.

eriuzo
  • 1,687
  • 1
  • 14
  • 16
0
  1. Provide R.java file path in you import section

     import com.package.name.R;
    
  2. File-> Invalidate Caches/Restart

And also check targetSDK version in gradle.

Laxmeena
  • 780
  • 2
  • 7
  • 28
0

To build your app, go to your app folder directory, in there there is a folder called .gradle, this folder is usually hidden so you have to find and delete it, then build your app again allow android studio to download the new .gradle contents for the app and hopefully you should not find the error again. To do this, you have to be connected to the internet.

Aliyu Abdullahi
  • 129
  • 1
  • 4
-1

1- Update Android Studio To 1.5.1, Rebuild Your Projectand Check Import (R) To Solve This Problem .

2- ActionBarActivity Class Deprecated.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841