Android Question How to finished test the Google Map

Theera

Expert
Licensed User
Longtime User
Hi all,
I've error log as belows. Refer to this.
LogCat connected to: emulator-5554
** Activity (main) Create, isFirst = true **


java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4132500 but found 4242000. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />


at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at anywheresoftware.b4a.objects.MapFragmentWrapper.IsGooglePlayServicesAvailable(MapFragmentWrapper.java:101)
at b4a.testgooglemap.main._activity_create(main.java:307)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:173)
at b4a.testgooglemap.main.afterFirstLayout(main.java:98)
at b4a.testgooglemap.main.access$100(main.java:16)
at b4a.testgooglemap.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
 

Attachments

  • TestGoogleMap.zip
    6.6 KB · Views: 136
  • APIOfAndroidAppKey.png
    APIOfAndroidAppKey.png
    16.8 KB · Views: 161
  • 2014-02-22_102530.png
    2014-02-22_102530.png
    57.6 KB · Views: 142
  • ObtainAPIKey.png
    ObtainAPIKey.png
    35.9 KB · Views: 174

Theera

Expert
Licensed User
Longtime User
The test about GoogleMap or GPS ,I must be out-door,aren't I?
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Hi all,
I've restarted to a new project creation,and test on the real device 4.04 ,my result is the same in post #1 as belows
LogCat connected to: B4A-Bridge: unknown Q88B-6S-352273016428523
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
** Activity (main) Resume **
Connected to B4A-Bridge (Wifi)
Installing file.
** Activity (main) Pause, UserClosed = false **
Streams_terminated
Connected to B4A-Bridge (Wifi)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
sending message to waiting queue (CallSubDelayed - UpdateStatus)
running waiting messages (2)
** Activity (main) Resume **
Installing file.
** Activity (main) Pause, UserClosed = false **
PackageAdded: package:b4a.gmap
** Activity (main) Create, isFirst = true **
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4132500 but found 4242000. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at anywheresoftware.b4a.objects.MapFragmentWrapper.IsGooglePlayServicesAvailable(MapFragmentWrapper.java:101)
at b4a.gmap.main._activity_create(main.java:282)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:173)
at b4a.gmap.main.afterFirstLayout(main.java:98)
at b4a.gmap.main.access$100(main.java:16)
at b4a.gmap.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4132500 but found 4242000. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
** Activity (main) Resume **

My manifest file is
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddManifestText( <permission
android:name="$PACKAGE$.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>)

AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyD88jtGo47pWpjo8NsmJ4hoMmEKbK3m1K4"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"
/>)
AddPermission(android.permission.ACCESS_NETWORK_STATE)

What somethings be wrong with me? I've tried all of this day.

P.S. My details is jdk8.0 B4A3.2 SDK is the lastest version. win8 32bits
 
Last edited:
Upvote 0

Spinter

Active Member
Licensed User
Longtime User
I found out today yesterday I aggiornado sdk version 19 and that's why I do not work, now I have to figure out what to do but at least I know that it is the version of google service
 
Upvote 0

Spinter

Active Member
Licensed User
Longtime User
I solved it by re copying the two files google-play-services.jar as explained in the forum to step 2)
http://www.b4x.com/android/forum/threads/google-maps-android-v2-tutorial.24415/#content

2. Copy google-play-services.jar to the libraries folder - This file is available under:
PHP:
C:\<android sdk>\extras\google\google_play_services\libproject\google-play-services_lib\libs (ignore the extra space that the forum script insists on adding)

You should copy it to the libraries folder.
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Hi all,

@Mio Sito,I've already to copy google-play-services.jar to the custom libraries folder,but it's still the same result. Have someone 's guide this?
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
OK. I see my problem, I have 2 locations for google-play-services.jar,one is the custom libraries folder,and another one is the main libraries. I think that I could do it. Thank you for all.(I should keep it only one location which is the main libraries)
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Hi all,
I can run it,but I have problem which is Google Play services not available,How do I continue? Please to help me again.
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
Ok I can finished already,I must enable the map.
 

Attachments

  • DevelopersConsole.png
    DevelopersConsole.png
    11.7 KB · Views: 139
Upvote 0

Spinter

Active Member
Licensed User
Longtime User
remember to give the location of the sdk

Sample!
#AdditionalRes: C:\Android\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
 
Upvote 0

Theera

Expert
Licensed User
Longtime User
I'm sorry that I 've posted,I can finished this thread already. Many thanks,Mio
 
Upvote 0
Top