java.lang.IllegalStateException

Error using newLatLngBounds(LatLngBounds, int): Map size can't be 0. Most likely, layout has not yet occured for the map view. Either wait until layout has occurred or use newLatLngBounds(LatLngBounds, int, int, int) which allows you to specify the map's dimensions.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web3

  • via Stack Overflow by Kasun Sampath
    ,
  • Stack trace

    • java.lang.IllegalStateException: Error using newLatLngBounds(LatLngBounds, int): Map size can't be 0. Most likely, layout has not yet occured for the map view. Either wait until layout has occurred or use newLatLngBounds(LatLngBounds, int, int, int) which allows you to specify the map's dimensions. at com.google.a.a.ae.b(Unknown Source) at com.google.maps.api.android.lib6.gmm6.c.a.a(Unknown Source) at com.google.maps.api.android.lib6.e.dy.a(Unknown Source) at com.google.maps.api.android.lib6.gmm6.c.a.a(Unknown Source) at com.google.maps.api.android.lib6.e.ev.b(Unknown Source) at com.google.android.gms.maps.internal.j.onTransact(SourceFile:92) at android.os.Binder.transact(Binder.java:395) at com.google.android.gms.maps.internal.IGoogleMapDelegate$zza$zza.animateCamera(Unknown Source) at com.google.android.gms.maps.GoogleMap.animateCamera(Unknown Source) at mono.java.lang.RunnableImplementor.n_run(Native Method) at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6862) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,