Android Question Error in AndroidManifest.xml

Penfound

Active Member
Licensed User
Longtime User
Hi I'm getting an error message...

B4X:
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" />
...and as far as I can tell I have already entered it into the manifest file as below...

B4X:
AddApplicationText(
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
)

I did try adding just the <Application> tag but it did not want to accept that.
I know it is me but what have I got wrong please?

Cheers all
Penfound
 

Penfound

Active Member
Licensed User
Longtime User
Hi Erel

I was following your tutorial as best I could so I added this...

B4X:
#AdditionalRes: C:\AndroidSDK\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms

I have just checked that actual location and the folder exists but the "com.google.android.gms" is not there and I have searched my machine for it and can't find it anywhere. I have used the AndroidSDK Manager to download all the files you suggested. Is there anything else I can do?

Cheers
Penfound
 
Upvote 0

Penfound

Active Member
Licensed User
Longtime User
I did discover that google_play_services.jar was smaller than another one. I thought I had copied it across but apparently not. So I did copy it across and, guess what - no change :(

Still got the error.

IT seems there is no solution to this one as I tried Googling the bit about expecting 4132500 instead of 4242000. Each lead I followed ended up in the murky greyness of no solution.

Ce la vie!

Penfound
 
Upvote 0

Penfound

Active Member
Licensed User
Longtime User
Updating the Google Play Services.apk eventually worked. It took three goes before it decided that there was an update suitable for download.

Thanks Erel
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
i have the same problem and i dont know what to do after i updated google play service to rev17 its not working anymore rev 15 worked well

what can i do? how do i update the google play service in the device?
 
Upvote 0

erosmax

Well-Known Member
Licensed User
Longtime User
I have the same problem.
My application it's completed on 05.25.2014. Now, when I go to edit it (to Update) I get that error. :(

Into SDK Manager it's All upgrade!

I dont't modify my code and the graphics it's wrong!

This is my error log: :eek:

Errgms.jpg


and this is my Manifest.xml

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="13" android:targetSdkVersion="16"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false" />)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddApplicationText(
<meta-data android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
                    )
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
i had the same error after i updated the google play service rev to 17
with rev 15 its working

you need to downgrade to rev 15
 
Upvote 0

erosmax

Well-Known Member
Licensed User
Longtime User
Gasp... but, the other my App, working without problem... only this app have a problem. :confused:
I do you downgrade the rev of ggogle pay services?
My app is pubblished into Google Play Store.
 
Last edited:
Upvote 0

erosmax

Well-Known Member
Licensed User
Longtime User
Nothing!
I've fond this metode:
Anyway, for those who want to downgrade Android SDK Tools to a previous version, it can be possible following these steps:

  1. Find your Android SDK folder
  2. Locate the "tools" subfolder and rename it to "tools1" (just to keep a backup copy of the original tools folder)
  3. Download from google repository the SDK Tool version you want to downgrade to (in this case it was: http://dl-ssl.google.com/android/repository/tools_r15-windows.zip) and unpack it.
  4. The ZIP file you downloaded contains a tools folder that has to be moved to your Android SDK folder.

I've reload the SDK Manager but I dont have the emulator and, if i try to install it, he want update sdk to 19 or 22.

How did you do?

Thanks
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
but i have updated the google play service to rev 17 this is the latest one
and i get this error...
 
Upvote 0

erosmax

Well-Known Member
Licensed User
Longtime User
Hi Erel, noe I did are you said, but when I compiling, I see this error: :confused:
Parsing code. 0.03
Compiling code. 0.06
Compiling layouts code. 0.00
Generating R file. 0.31
Compiling generated Java code. 1.73
Convert byte code - optimized dex. 5.01
Packaging files. 1.33
Copying libraries resources 0.02
Found 7 resource files.
Signing package file (debug key). 0.86
ZipAlign file. 0.04
Installing file to device. Error
pkg: /data/local/tmp/Pensieri_di_amore_DEBUG.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

Restarting ADB Server may solve this problem.
Tools - Restart ADB Server. Device serial: emulator-5554

....I've restarted ADB Server but nothing happens.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Have you copied google-play-services.jar from the Extras folder to the additional libraries folder?

nope :oops:

thanx erel i will do it and try if this solve the problem
 
Upvote 0
Top