0
0

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 3 years have passed since last update.

cameraX と opencvでのruntimeで Caused by: java.lang.ClassCastException: Bootstrap method returned null camerax となるエラー回避備忘録

Posted at

概要

アプリケーションビルド後、

Caused by: java.lang.ClassCastException: Bootstrap method returned null camerax

となって初期化に失敗する。

解決策

この@iwatake2222さんや@kk2170さんの
以下のありがたい記事を参考にし、

https://qiita.com/iwatake2222/items/c0ebe6d84afdef57aab3
https://qiita.com/kk2170/items/472dddb86b373f52f8e9

app:build.gradle

にJava8機能を有効化するような記述を追加する必要があった。

    android {
        compileOptions {
            targetCompatibility = "8"
            sourceCompatibility = "8"
        }
    }

これを行った時は念のため

build から
clean project を実行しておく。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?