I have an error with my app the error says
ParseError at [row,col]:[66,34] Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributeNSNotUnique? Button&layout_column
I can't find where the error is.. I don't know which are the row and col... maybe in the xml files?
This is the AndroidManifest file
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.***">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="App Name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="com.example.appname.MainActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="appname"
android:value="ca-app-pub-2703074771097768~4557375307"/>.
</application>
I had similar issue:
ParseError at [row,col]:[8,279]
Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributeNSNotUnique?androidx.constraintlayout.widget.ConstraintLayout&layout_width&http://schemas.android.com/apk/res/android
What you need to do:
First read the error message carefully, in my case it's mentioned in error message that there is something wrong with:
ConstraintLayout&layout_width
attribute in my latest layout xml file.
In my case I had mistakenly added layout_height
and layout_width
attributes to <layout>
tag, which is actually meant only for data binding. So just by removing those lines I was able to fix this issue.
The layout
that I initially had:
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
To fix this issue I did:
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
As the answer here explains, the error you're getting is getting obscured by an updated version of Gradle. In my case, I also had the [row][col] message, and when I downgraded my Gradle version from 4.2.2 to 4.1.3 and compiled again, it now showed me the real error (I had a duplicated attribute in one of my XMLs) and I was able to solve it.
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