Android Studio: The opening quotes should be used for the 'X' attribute associated with an element type 'x'

1

The following error occurs to me and I do not know why:

  

Error: Execution failed for task ': app: processDebugManifest'.   com.android.manifmerger.ManifestMerger2 $ MergeFailureException: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 25; The opening quotes should be used for the "xmlns: android" attribute associated with a type of "manifest" element.

This is the manifest:

<?xml version="1.0" encoding="utf-8"?>  
<manifest 
xmlns:android="schemas.android.com/apk/res/android"; 
package="com.example.myapplication">

<application android:allowBackup="true" 
    android:icon="@mipmap/ic_launcher" 
    android:label="@string/app_name" 
    android:roundIcon="@mipmap/ic_launcher_round" 
    android:supportsRtl="true" 
    android:theme="@style/AppTheme"> 

<activity android:name=".MainActivity" android:label="@string/app_name" android:theme="@style/AppTheme.NoActionBar"> 
    <intent-filter> 
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" /> 
    </intent-filter>
 </activity> 

</application> 
</manifest>
    
asked by Isaac 31.08.2017 в 13:43
source

2 answers

3

You have AndroidManifest quite bundled, the problems are:

  • xmlns:android="schemas.android.com/apk/res/android"; that ; final over.
  • This is not correct schemas.android.com/apk/res/android , what correct in this case would be% http://schemas.android.com/apk/res/android

I leave you here as you should have it:

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity
            android:label="@string/app_name"
            android:name=".MainActivity"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
</manifest>
    
answered by 31.08.2017 в 15:39
-1

As a complement, the namespaces defined in the .xml must start with http:// and do not carry ;

<?xml version="1.0" encoding="utf-8"?>  
<manifest 
xmlns:android="schemas.android.com/apk/res/android"; 
package="com.example.myapplication">

therefore this must be the right thing to do:

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

AndroidManifest.xml complete:

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

  <application android:allowBackup="true" 
    android:icon="@mipmap/ic_launcher" 
    android:label="@string/app_name" 
    android:roundIcon="@mipmap/ic_launcher_round" 
    android:supportsRtl="true" 
    android:theme="@style/AppTheme"> 

<activity android:name=".MainActivity" android:label="@string/app_name" android:theme="@style/AppTheme.NoActionBar"> 
    <intent-filter> 
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" /> 
    </intent-filter>
 </activity> 

</application> 
</manifest>
    
answered by 31.08.2017 в 16:17