12
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AndroidXのmaterial:1.1.0-alpha08にアップデートしたらビルドエラー

Posted at

AndroidXでBottomNavigationViewを使おうとしたら、
ビルドエラーになって悩んだのでメモ。

経緯

androidx のBottomNavigationViewの調査のため、
com.google.android.material:material を 1.1.0-alpha08 にアップデートしたら、エラー。

スクショ_AndroidStudio_Error_Invoke-customs_are_only_supported_starting_with_Android_O.png

Error: Invoke-customs are only supported starting with Android O (--min-api 26)というエラーになるが、そもそも関係なかったorz

解決策

Javaのバージョンを上げるだけ。
エラーの内容は全く関係がないので、だいぶはまった。

app/build.gradle
android {

    ・・・

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

おわり

12
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?