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

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

If you have ever seen an error like below, we have fixed this and got it resolved. The error and solution is like as below.

Compilation Error

Invoke-customs are only supported starting with android o (--min-api 26)

Solution

Modify top level build.gradle file to add following lines

apply plugin: 'com.android.application'

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

Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

2 thoughts on “Solved: Error: Invoke-customs are only supported starting with Android O (–min-api 26)”

  1. Thanks for sharing this informative post! I’m currently working on an Android project that requires Invocation API 26 or newer, and I was confused by the error message I was getting. Your solution worked like a charm! Your blog post is very helpful and well-explained. Keep up the great work!

    Reply
  2. Thanks for sharing this helpful tutorial! I’m working on a project that requires me to use custom invokes on Android O+ devices, and your post came at the right time. I’m glad to know that there’s a solution for this issue now. Can you please provide more details on how to implement this in our project?

    Reply

Leave a Comment