1
1

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.

AndroidアプリのGoogleMap表示時に"CameraUpdateFactory is not initialized" が発生する

Posted at

端末によって Fatal Exception java.lang.NullPointerException CameraUpdateFactory is not initialized が発生する

もしかしたら解決するかもしれないこと

  • onCreate で MapsInitializer.initialize(context) をする
  • GoogleMapを更新する
  • GooglePlayServicesUtil.isGooglePlayServicesAvailable で状態を確認する
  • GooglePlay 開発者サービスを更新する

それぞれについて

onCreate で MapsInitializer.initialize(context) をする

GoogleMapを更新する

GooglePlayServicesUtil.isGooglePlayServicesAvailable で状態を確認する

  • Success で無いならそれが原因かもしれない。

GooglePlay 開発者サービスを更新する

今回この問題が起きた状況

  • 自分の私用端末(Android 5.0)をメインに開発、4.0で確認したらことごとく動かない。
  • 4.0は自分の旧私用端末なので初期化してあったことがもろもろ動かなかったことの大きな原因。
  • たいていはアカウント登録したり時刻合わせたりGoogle Play ほかいろいろの同意文に同意したりでだんだん動くようになる。
  • でもまさか開発者サービスとは。長い時間かけて更新していたのでかなりアップデートされているのかも。

GooglePlayのアプリ一覧で更新分として出てこないので気づきにくかったです。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?