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
}
}
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!
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?