Android Question Manifest file: Missing meta-data tag?

toby

Well-Known Member
Licensed User
Longtime User
I got the following compilation error
java.lang.IllegalStateException: 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="[USER=21225]@Integer[/USER]/google_play_services_version" />

But my Manifest file does contain the meta-tag in question, as shown below:
Manifest file:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.
'Caused by: java.lang.IllegalStateException: 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="[USER=21225]@Integer[/USER]/google_play_services_version" />
AddApplicationText(
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="don't show my api key in the forum"
/>

<meta-data android:name="com.google.android.gms.version" android:value="[USER=21225]@Integer[/USER]/google_play_services_version" />
)

Could someone tell me what went wrong, please

TIA
 

toby

Well-Known Member
Licensed User
Longtime User
Attached is the test app with which I try to show the google map directions between to points. Note: api key stripped before zipping.
 

Attachments

  • googleMapDirection.zip
    11.4 KB · Views: 173
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Maybe this tutorial on google maps might help:

 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
i know is old this thread, with this error, i found this soluction.


Error:
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" />

Solution:
That is, inclue this in manifest:

AddApplicationText(<meta-data android:name="com.google.android.gms.version"
android:value="@Integer/google_play_services_version" /> )
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is the wrong solution.

Correct answer is:
B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
thansk, now i know how other proyect are ok whit my bad solution... i have you code in manifest.
great!!
 
Upvote 0
Top