Android Question [SOLVED]<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> - WHY?

MrKim

Well-Known Member
Licensed User
Longtime User
aNSWER: NEEDED BECAUSE I AM USING BARCODE SCANNER.
New computer/new B4A install just wanted to update an old app to 34 and I was hit with:
B4X:
networkpage_createdetector (java line: 773)
com.google.android.gms.common.GooglePlayServicesMissingManifestValueException: A required meta-data tag in your app's AndroidManifest.xml does not exist.  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" />
..etc.
Research shows the only difference is the new install uses android 33 the old one was 30. I finally found this:
B4X:
AddApplicationText(<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />)
HERE:
Which I added to the manifest and it seems to solve my problem but my questions are:

What is it?
Why is it now needed?
Is adding that and changing the targetversion to 34 all I need to do?

This page does request PERMISSION_CAMERA which is the only permission this app requires.
 
Last edited:
Solution
Looks like you are using a Google Play Services feature (barcode scanning?).

All those features require this version declaration. It just tells Google SDK which version of this SDK was your app compiled with. Best to add it with:
B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

Erel

B4X founder
Staff member
Licensed User
Longtime User
Looks like you are using a Google Play Services feature (barcode scanning?).

All those features require this version declaration. It just tells Google SDK which version of this SDK was your app compiled with. Best to add it with:
B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
 
Upvote 0
Solution
Cookies are required to use this site. You must accept them to continue using the site. Learn more…