I am crashing on the mapfragment.IsGooglePlayServicesAvailable statement. The API key is correct in the actual code. I am using 5.80
Please help
in Process_Globals
Dim gmap As GoogleMap
In sub Globals
Dim mapfragment As MapFragment
Dim mpanel As Panel
in Activity_Create
mpanel.Initialize("")
mapfragment.Initialize("Map", mpanel)
Log("panel init")
If mapfragment.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Please install Google Play Services.", True)
End If
Log("init done")
in the manifest - API key obscured
AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCcQkfLzlxkSxx8d4XXXXXXX_Vi7ugsShU"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@Integer/google_play_services_version"/>)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
The log is
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
panel init
main_activity_create (java line: 687)
java.lang.NoClassDefFoundError: com.google.android.gms.common.GoogleApiAvailability
at anywheresoftware.b4a.objects.MapFragmentWrapper.IsGooglePlayServicesAvailable(MapFragmentWrapper.java:92)
at kazoom.kaz.main._activity_create(main.java:687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at kazoom.kaz.main.afterFirstLayout(main.java:102)
at kazoom.kaz.main.access$000(main.java:17)
at kazoom.kaz.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
This line is in the #Region Project Attributes
#AdditionalRes: C:\android\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
Please help
in Process_Globals
Dim gmap As GoogleMap
In sub Globals
Dim mapfragment As MapFragment
Dim mpanel As Panel
in Activity_Create
mpanel.Initialize("")
mapfragment.Initialize("Map", mpanel)
Log("panel init")
If mapfragment.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Please install Google Play Services.", True)
End If
Log("init done")
in the manifest - API key obscured
AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCcQkfLzlxkSxx8d4XXXXXXX_Vi7ugsShU"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@Integer/google_play_services_version"/>)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
The log is
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
panel init
main_activity_create (java line: 687)
java.lang.NoClassDefFoundError: com.google.android.gms.common.GoogleApiAvailability
at anywheresoftware.b4a.objects.MapFragmentWrapper.IsGooglePlayServicesAvailable(MapFragmentWrapper.java:92)
at kazoom.kaz.main._activity_create(main.java:687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at kazoom.kaz.main.afterFirstLayout(main.java:102)
at kazoom.kaz.main.access$000(main.java:17)
at kazoom.kaz.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)
This line is in the #Region Project Attributes
#AdditionalRes: C:\android\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms