Google maps app crash


#1

Hello everyone,
I decide to use google maps component for my app because i have to place a lot of markers and in the openmap component i have to place every marker separately. My problem is that if i want to place two google map components my app crashes when its open. Anybody knows why?


#2

you can probably find it out yourself like this


Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.


#3
02-06 18:10:22.337 13081 13081 I GoogleMap: In the constructor of GoogleMap
02-06 18:10:22.337 13081 13081 I GoogleMap: savedInstanceState in GM: null
02-06 18:10:22.346 13081 13081 W GmsClientEvents: registerConnectionCallbacks(): listener com.google.appinventor.components.runtime.GoogleMap@80636f7 is already registered
02-06 18:10:22.346 13081 13081 W GmsClientEvents: registerConnectionFailedListener(): listener com.google.appinventor.components.runtime.GoogleMap@80636f7 is already registered
02-06 18:10:22.346 13081 13081 I GoogleMap: map_tag:map_1549469422346
02-06 18:10:22.349 13081 13081 E GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
02-06 18:10:22.356 13081 13081 I GoogleMap: googlePlayServicesAvailable:0
02-06 18:10:22.358 13081 13081 I GoogleMap: here before adding fragment
02-06 18:10:22.358 13081 13081 I GoogleMap: setUpMapIfNeeded. mMap is null
02-06 18:10:22.358 13081 13081 D Form    : Form.Width = 320
02-06 18:10:22.358 13081 13081 W System.err: Form.setChildWidth(): width = -2 parent Width = 320 child = com.google.appinventor.components.runtime.GoogleMap@80636f7
02-06 18:10:22.358 13081 13081 D Form    : Form.Height = 569
02-06 18:10:22.359 13081 13081 I GoogleMap: In the constructor of GoogleMap
02-06 18:10:22.359 13081 13081 I GoogleMap: savedInstanceState in GM: null
02-06 18:10:22.359 13081 13081 W GmsClientEvents: registerConnectionCallbacks(): listener com.google.appinventor.components.runtime.GoogleMap@1c737cd is already registered
02-06 18:10:22.359 13081 13081 W GmsClientEvents: registerConnectionFailedListener(): listener com.google.appinventor.components.runtime.GoogleMap@1c737cd is already registered
02-06 18:10:22.359 13081 13081 I GoogleMap: map_tag:map_1549469422359
02-06 18:10:22.360 13081 13081 E GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
02-06 18:10:22.363 13081 13081 I GoogleMap: googlePlayServicesAvailable:0
02-06 18:10:22.365 13081 13081 I GoogleMap: here before adding fragment
02-06 18:10:22.365 13081 13081 I GoogleMap: setUpMapIfNeeded. mMap is null
02-06 18:10:22.365 13081 13081 D Form    : Form.Width = 320
02-06 18:10:22.365 13081 13081 W System.err: Form.setChildWidth(): width = -2 parent Width = 320 child = com.google.appinventor.components.runtime.GoogleMap@1c737cd
02-06 18:10:22.365 13081 13081 D Form    : Form.Height = 569
02-06 18:10:22.386  1586  3775 I ActivityManager: START u0 {act=android.content.pm.action.REQUEST_PERMISSIONS pkg=com.android.packageinstaller cmp=com.android.packageinstaller/.permission.ui.GrantPermissionsActivity (has extras)} from uid 10469 on display 0
02-06 18:10:22.396 13081 13081 E GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
02-06 18:10:22.399 13081 13081 I zzai    : Making Creator dynamically
02-06 18:10:22.456 13081 13081 I DynamiteModule: Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
02-06 18:10:22.456 13081 13081 I DynamiteModule: Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
02-06 18:10:22.474 13081 13081 W System  : ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/000000c3/n/arm64-v8a
02-06 18:10:22.542 13081 13081 I Google Maps Android API: Google Play services client version: 10084000
02-06 18:10:22.546 13081 13081 I Google Maps Android API: Google Play services package version: 15090021
02-06 18:10:22.892  1586  1627 W ActivityManager: Activity pause timeout for ActivityRecord{ad885af u0 com.appybuilder.bp0707lougos.sqlite/.Screen1 t1968}
02-06 18:10:22.917   588   588 I MSM-irqbalance: Decided to move IRQ177 from CPU5 to CPU7
02-06 18:10:22.918 13081 13081 D AndroidRuntime: Shutting down VM
02-06 18:10:22.919 13081 13081 E AndroidRuntime: FATAL EXCEPTION: main
02-06 18:10:22.919 13081 13081 E AndroidRuntime: Process: com.appybuilder.bp0707lougos.sqlite, PID: 13081
02-06 18:10:22.919 13081 13081 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.appybuilder.bp0707lougos.sqlite/com.appybuilder.bp0707lougos.sqlite.Screen1}: java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.view.ViewGroup
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2434)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.ActivityThread.access$900(ActivityThread.java:153)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5451)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: Caused by: java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.view.ViewGroup
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.BackStackRecord.configureTransitions(BackStackRecord.java:1244)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.BackStackRecord.beginTransition(BackStackRecord.java:978)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.BackStackRecord.run(BackStackRecord.java:707)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.FragmentController.execPendingActions(FragmentController.java:325)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.Activity.performStart(Activity.java:6339)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2397)
02-06 18:10:22.919 13081 13081 E AndroidRuntime: 	... 9 more

I am not sure what i am looking here


#4

It seems that the problem is not only in the Appybuilder. I tried in other distros and i have the same results. It’s not the blocks, i don’t use any blocks, i just insert the two times the google maps component.


#5

probably only one Google Map component is allowed? @Hossein?
Taifun