1

I use the below in my code:

ContextCompat.checkSelfPermission(mContext, Manifest.permission.READ_PHONE_STATE)

In my gradle I have:

compile 'com.android.support:appcompat-v7:25.0.1'

Everything was working fine and the builds were triggering, however suddenly my builds are failing with the below error:

 error: package android.support.v4.content does not exist

in the import statement :android.support.v4.content.ContextCompat

Can someone please help out. Since this is happening on a build machine I dont have android studio in it.

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
Sid
  • 1,224
  • 3
  • 23
  • 48

2 Answers2

0

just use this

Activity and extend from AppCompatActivity.

 compile 'com.android.support:appcompat-v7:25.3.1'
AskNilesh
  • 67,701
  • 16
  • 123
  • 163
Rasoul Miri
  • 11,234
  • 1
  • 68
  • 78
0

Include this

compile 'com.android.support:support-v4:25.0.1'
Paolo Forgia
  • 6,572
  • 8
  • 46
  • 58
akshay_shahane
  • 4,423
  • 2
  • 17
  • 30