Failed to call Android Kitkat Class?

I cannot name the KitKat class , for example, when I am going to call Intent.ACTION_OPEN_DOCUMENT. I get an error

ACTION_OPEN_DOCUMENT cannot be resolved or is not a field

and for takePersistableUriPermission(Uri, int)

The method takePersistableUriPermission(Uri, int) is 
undefined for the type ContentResolver
+4
source share
2 answers

Double check that your target build of the project uses Android 4.4 (SDK 19), in Eclipse you can do this:

Right-click the project and select Properties. Then select β€œAndroid” from the tree on the left. Then you can select the target version on the right.

If you do not see 4.4 as an option, open the SDK manager and make sure you have installed Android 4.4 KitKat

+8
source

Android Studio gradle, . , 19- sdk. , gradle, buildToolsVersion "19.0" compileSdkVersion 19. build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:+'
    }
}

apply plugin: "android"

android {
    buildToolsVersion "19.0"
    compileSdkVersion 19
}

gradle: β†’ Android β†’ gradle

@ - AndroidManifest.xml

+1

All Articles