LoginSignup
0
0

More than 3 years have passed since last update.

injectしてるクラスでNullpointException

Posted at

備忘録なので軽くー

ユーティリティで使用しているクラスに@injectしているクラスを設定して実行したら、NullPointExceptionで異常終了。

意味がわからなくて、調べたり聞いたりしたら、Staticメンバクラスで@injectを宣言して実行してもインスタンスが作成されないため、Nullで落ちるみたい。
それでも実行させるやり方は色々あるらしい。

ただ、実装上は問題ないため、コンパイルエラーは起きない。

詳しい話は気力があったら、調べよう。

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