I am making a project of connecting to the star wars api, getting json object replies and presenting them on my View through recycleView (in short). However i am getting erros on build project through my gradle file (here in its entirety) :
apply plugin: 'com.android.application'
android {
// Configure only for each module that uses Java 8
// language features (either in its source code or
// through dependencies).
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion 28
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.juangm.bottomnavigationmvp"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test:rules:1.1.0'
compile 'com.android.support:appcompat-v7:28.3.1'
compile 'com.android.support:cardview-v7:28.3.1'
compile 'com.android.support.constraint:constraint-layout:1.1.3'
compile 'com.android.support:design:28.3.1'
compile 'com.android.support:support-v4:28.3.1'
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:8.3.2'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.5'
implementation 'com.jakewharton:butterknife-compiler:8.1.0'
compile 'com.squareup.retrofit2:retrofit:2.5.0'
compile 'com.squareup.retrofit2:converter-gson:2.5.0'
compile 'com.squareup.okhttp3
khttp:3.12.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.8.1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.3'
compile 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.1.1
The error i am getting : **Static interface methods are only supported starting with Android N (--min-api 24): void butterknife.Unbinder.lambda$static$0() Stack trace: **
As you can see, i have already added the compile options for JAVA.version 1_8 on the gradle, but it does not seem to solve the problem.
Any help is appreciated...
android {
// Configure only for each module that uses Java 8
// language features (either in its source code or
// through dependencies).
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion 28
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.juangm.bottomnavigationmvp"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test:rules:1.1.0'
compile 'com.android.support:appcompat-v7:28.3.1'
compile 'com.android.support:cardview-v7:28.3.1'
compile 'com.android.support.constraint:constraint-layout:1.1.3'
compile 'com.android.support:design:28.3.1'
compile 'com.android.support:support-v4:28.3.1'
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:8.3.2'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.5'
implementation 'com.jakewharton:butterknife-compiler:8.1.0'
compile 'com.squareup.retrofit2:retrofit:2.5.0'
compile 'com.squareup.retrofit2:converter-gson:2.5.0'
compile 'com.squareup.okhttp3
![Eek! :eek: :eek:](/styles/smilies/google/eek.png)
compile 'com.squareup.okhttp3:logging-interceptor:3.8.1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.3'
compile 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.1.1
The error i am getting : **Static interface methods are only supported starting with Android N (--min-api 24): void butterknife.Unbinder.lambda$static$0() Stack trace: **
As you can see, i have already added the compile options for JAVA.version 1_8 on the gradle, but it does not seem to solve the problem.
Any help is appreciated...