• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Didn't find class "java.nio.file.Paths"

I recently update my app and when I run again I got the error java.lang.ClassNotFoundException: Didn't find class "java.nio.file.Paths" this is an extract of my build.gradle file:

android {
compileSdkVersion 28
defaultConfig {
applicationId "xxx.xxxxx.xxxx"
minSdkVersion 21
targetSdkVersion 28
versionCode 12
versionName "9.1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

the error is when I try to create a file with:

File(Environment.getExternalStorageDirectory(), filename)
 
Back
Top Bottom