Invoke-Customs Are Only Supported Starting with Android 0 --Min-API 26

Invoke-customs are only supported starting with android 0 --min-api 26

After hours of struggling, I solved it by including the following within app/build.gradle:

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

https://github.com/mapbox/mapbox-gl-native/issues/11378

Error: Invoke-customs are only supported starting with Android O (--min-api 26)

Try to add below to your app/build.gradle to make your Android project compilation be compatible with Java 8.

android {
....
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
....
}

Only on androidTest: Invoke-customs are only supported starting with Android O

This is a bug in Android Studio 3.5 beta. I filed a bug with the Android Studio team, and this will be fixed with the Android Studio 3.5 beta 03 build tools.

Kotlin module problem that turns into java noClassDefFoundError

These are the two Stack Overflow posts that led me to my answer (1, 2).

You need to update your Gradle settings. I updated mine to Gradle version 6.1.1 using the chart in the answer to the first SO post I referenced.

The second thing you need to do is specify sourceCompatibility and targetCompatibility as JavaVersion.VERSION_1_8 in the compileOptions section of the app level Gradle file.



Related Topics



Leave a reply



Submit