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

一曲冷凌霜 提交于 2021-02-18 19:51:04

问题


I have added minimum sdk 16 and target sdk is 29 . My android studio version is 3.5.2 . And this issues is coming : Invoke-customs are only supported starting with Android O (--min-api 26) For this issues I could not find any solution . Please help me out from this issues.


回答1:


Probably some method you are using needs the lvl 26 API and the minimum supported is 16 or you missing the compile options to java version.

Feel free to try:

  • Add compile options to the gradle file
android{
    ...

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

or

  • Change the minimum sdk for 26.

or

  • Search where is this error and switch to a codecompatible with API 16


来源:https://stackoverflow.com/questions/58875640/invoke-customs-are-only-supported-starting-with-android-o-min-api-26

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!