исправляет вышеуказанную ошибку.

учаю сообщение об ошибке в приведенном ниже коде:

 if (ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
}

«CheckSelfPermission» всегда красный, указывая на какую-то ошибку.

Я импортировал "import android.support.v4.content.ContextCompat;" уже.

Ниже мой контент build.gradle:

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"

defaultConfig {
    applicationId "com.xyz.user.abc"
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//    testCompile 'junit:junit:4.12'
compile files('libs/volley.jar')
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.google.android.gms:play-services:10.2.1'
compile 'com.android.support:design:25.3.0'
compile 'junit:junit:4.12'
//    compile 'com.google.android.gms:play-services-appindexing:10.2.1'
//    compile 'com.google.android.gms:play-services:9.8.0'
//    compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.android.support:support-v4:25.3.0'
compile files('libs/android-support-v4.jar')
}

Любой совет будет по достоинству оценен.

Я понятия не имею, почему это не работает. Вид нуб в этом.

Ответы на вопрос(1)

Ваш ответ на вопрос