简体   繁体   中英

Failed to parse XML error in android studio

I am finding this error in the My Manifest file in the Android studio.I am aware of the fact that this question has been asked before and the solution is to rectify the manifest file but I feel that this file doesn't have any error.(unless I have still missed something)

Failed to parse XML in C:\\Users\\DELL\\Desktop\\Android studio\\AndroidStudioProjects\\5.REBUS PUZZLE\\RebusPuzzles\\app\\src\\main\\AndroidManifest.xml
ParseError at [row,col]:[70,9]
Message: expected start or end tag
Affected Modules: app
Note that the [row, col]:[70,9] is not the exact number as I had this error at an earlier stage and then added few tags but the row-column number remained the same even after changes which means that[70,9] might not be the exact location of the error. But still, I have marked row number 70 in my code given below

I am trying to rectify it for several days but can't find the solution. Any help would be appreciated Thank you

MY AndroidManifest.XML

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.tz.rebuspuzzles"
     >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <uses-feature
        android:name="android.hardware.location"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.location.gps"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.location.network"
        android:required="false" />

    <application
        tools:replace="android:allowBackup"
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/app_icon"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:ignore="ExtraText"
        android:usesCleartextTraffic="true"
        tools:targetApi="m">

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-4933880264960213~2855079080"/>

        <meta-data android:name="applovin.sdk.key"
            android:value="1p2moVFG0VBUQ_vqgpyJZ18b-8sIuVr9viNxfB8f31_VilypJa8OMgUyHaLy-f4ngCuKAZun_1Gp358RTB1B99" />


        <activity android:name=".MainActivity"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen"
            android:configChanges="orientation|keyboardHidden|screenSize"
            >

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!--
                  ATTENTION: This data URL was auto-generated. We recommend that you use the HTTP scheme.
                  TODO: Change the host or pathPrefix as necessary.
                -->
                <data
                    android:host="solveariddle.com"
                    android:scheme="http" />
            </intent-filter>
        </activity>

        <activity
            android:name=".SecondActivity"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" />
            android:configChanges="orientation|keyboardHidden|screenSize"
        <activity       ----------------------->THIS IS ROW 70  FOR YOUR REFERENCE
            android:name=".SettingsActivity"
            android:screenOrientation="portrait" />
        <activity android:name=".SplashActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- Tapjoy -->
        <activity
            android:name="com.tapjoy.TJAdUnitActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
        <activity
            android:name="com.tapjoy.TJContentActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
        <activity
            android:name="com.tapjoy.mraid.view.ActionHandler"
            android:configChanges="orientation|keyboardHidden|screenSize" />
        <activity
            android:name="com.tapjoy.mraid.view.Browser"
            android:configChanges="orientation|keyboardHidden|screenSize" />
        <!-- Tapjoy -->


        <!--Include the AdActivity configChanges and theme. -->
        <activity android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />
        <!-- This meta-data tag is required to use Google Play Services. -->
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <!-- Facebook -->
        <provider
            android:name="com.facebook.FacebookContentProvider"
            android:authorities="com.facebook.app.FacebookContentProvider1155209377959249"
            android:exported="true" />

        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />


        <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />

 <!--       <activity-->
   <!--           android:name="com.facebook.ads.InterstitialAdActivity"-->
  <!--            android:configChanges="keyboardHidden|orientation|screenSize"></activity>-->

        <!-- <activity android:name="com.facebook.ads.InterstitialAdActivity" -->
        <!-- android:configChanges="keyboardHidden|orientation|screenSize"/> -->
        <!-- Facebook -->

        <!-- <receiver android:name="com.google.android.gms.analytics.CampaignTrackingReceiver" android:enabled="true" android:exported="true"> -->
        <!--     <intent-filter>-->
        <!--         <action android:name="com.android.vending.INSTALL_REFERRER" />-->
        <!--     </intent-filter>-->
        <!-- </receiver>-->
        <!-- <service android:name="com.google.android.gms.analytics.CampaignTrackingService" android:enabled="true" android:exported="false" />-->

    </application>

</manifest>
 

I think there are wrong closing tag from your above code,

try replace

        <activity
            android:name=".SecondActivity"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" />
            android:configChanges="orientation|keyboardHidden|screenSize"
        <activity       
            android:name=".SettingsActivity"
            android:screenOrientation="portrait" />

with this

        <activity
            android:name=".SecondActivity"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Light.NoTitleBar.Fullscreen" 
            android:configChanges="orientation|keyboardHidden|screenSize"/>
        <activity       
            android:name=".SettingsActivity"
            android:screenOrientation="portrait" />

I think the error is in this code:

android:configChanges="orientation|keyboardHidden|screenSize"

Move /> on string lower.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM