The meta-data tag in your app’s AndroidManifest.xml does not have the right value. Expected 8487000 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" />
If you are using AdMob in your app, you can’t comment out the plugin in build.settings and expect it to work. I’m pretty sure Brent was trying to have @Kangmin Won test to see if he had build.settings issues. If you wish to conduct test, you also have to comment out calls to ads.init(), ads.show() etc. in your code while you conduct the test.
Following my Build.settings file and the full error when using the 2 plugins.
build.settings:
plugins = { -- key is the name passed to Lua's 'require()' ["plugin.google.play.services"] = { -- required publisherId = "com.coronalabs", }, ["plugin.googleAnalytics"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true, osx=true, win32=true } }, },
Full error:
java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 8487000 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.zze.zzan(Unknown Source) at com.google.android.gms.common.zze.isGooglePlayServicesAvailable(Unknown Source) at com.google.android.gms.ads.internal.util.client.zza.zzU(Unknown Source) at com.google.android.gms.ads.internal.client.zze.zzb(Unknown Source) at com.google.android.gms.ads.internal.client.zzac.zzH(Unknown Source) at com.google.android.gms.ads.internal.client.zzac.zza(Unknown Source) at com.google.android.gms.ads.InterstitialAd.loadAd(Unknown Source) at CoronaProvider.ads.admob.AdMobAd$3.run(AdMobAd.java:209) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:155) at android.app.ActivityThread.main(ActivityThread.java:5689) 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:1029) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
I’m trying to find out what this error means. There is a good chance we are going to need a bug report. If I can go ahead and get you to submit one that would be great.
Please put together a sample project that demonstrates the issue. It needs to have a main.lua, config.lua and build.settings file and any assets to build and run the project. Put that in a zip file and use the Report a bug link at the top of the page.
I’m getting this same error on Android (Corona 2866), but mine seems to be related to OneSignal. If I comment out the call to initialise OneSignal the problem goes away, but if I leave it in it fails.
Is this broader than GA? If I remove GA will it help?
The OneSignal SDK depends on Google Play services (GMS) but it can use either version 8487000 or 4242000. It does not include GMS itself so it relies on another plugin to include it. The GMS methods that OneSignal accesses (as well as some other plugins) requires that the follow meta-data tag to be present.
However the issue is not all plugins that include GCM include this AndroidManifest.xml entry as they should. plugin.googleAnalytics should add this manifest however there would have to be something in Corona to manage the merging of the version to use the higher value to match the Java classes themselves.
Is there any update to this? I’m also having this issue. This prevents my game from using Google Play Game Services. The odd thing is that sometimes it works and sometimes it doesn’t. It seems to be random.
The only way to completely resolve this for now is to disable the Google Analytics plugin. A better solution would be appreciated. Thanks!
Commenting out the Analytics plugin like I have done above makes Google Play Game Services work correctly. Are you saying I can keep Analytics if I include the Admob plugin?
I can’t say for certain, but Its worth giving it a try.
The problem is rooted in the fact that many of the Android plugins want a different version of Google Play’s library. Some plugins include it, others don’t.
I’m hoping that including it will solve your problem.