In the manifest of my app, activities are highlighted in yellow and indicated:
XML tag has empty body
Reports empty tag body. The validation works in XML/JSP/JSPX/HTML/XHTML file types
I'm looking for information, but do not quite understand the message refers.
I appreciate any help to know that I'm doing wrong.
Every app project must have an AndroidManifest. xml file (with precisely that name) at the root of the project source set. The manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play.
Open your Android project and go to <AppProjectFolder>/app/src/main/. Open the app manifest file AndroidManifest. xml and add the following lines to the file as child elements of the <manifest> element. Note: You must include the QUERY_ALL_PACKAGES permission if your app targets Android 11 (API Level 30) or higher.
It is located under android folder inside your monaca project as shown below: For Cordova 6.2 or higher, AndroidManifest. xml file is removed from Monaca framework. Therefore, in order to config Android application settings, use Android Configuration Page.
XML tag has empty body
The refers to your <activity>
tags as you are closing them with a </activity>
instead of <activity (rest of code here...) />
Using an explicit </activity>
implies there is a body to your <activity>
such as in this example:
<activity
android:name=".SplashActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Whereas you are wanting something along these lines:
<activity
android:name=".MainActivity"
android:label="@string/app_name" />
With the />
at the end to get rid of these warnings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With