Android Build a Weather App Concurrency and Error Handling Configuring the AlertDialog

Paul Vickers
Paul Vickers
3,379 Points

Error: Static interface methods are only supported starting with Android N (--min-api 24): okhttp3.Request okhttp3.Authe

I am getting this error message and it won't compile

2 Answers

Hi Paul. Check my answer to a similar question.

Hope that helps :)

Martin Klestil
Martin Klestil
5,515 Points

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://stackoverflow.com/questions/49891730/invoke-customs-are-only-supported-starting-with-android-0-min-api-26