ParseError at [row,col]:[66,34] 消息:-xml-names-19990114#AttributeNSNotUnique?Button&layout_column [英] ParseError at [row,col]:[66,34] Message: -xml-names-19990114#AttributeNSNotUnique?Button&layout_column
问题描述
我的应用程序出错,错误提示
ParseError at [row,col]:[66,34] 消息:http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributeNSNotUnique?Button&layout_column
我找不到错误在哪里..我不知道行和列是哪个...也许在 xml 文件中?
这是 AndroidManifest 文件
AndroidManifest.xml<?xml version="1.0";编码=utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android";包=com.example.***"><申请android:allowBackup="true";android:icon="@mipmap/ic_launcher";android:label="应用名称"android:roundIcon="@mipmap/ic_launcher_round";android:supportsRtl="true";android:theme="@style/AppTheme"><活动android:name=com.example.appname.MainActivity"android:theme="@style/Theme.AppCompat.NoActionBar";android:screenOrientation="肖像"><意图过滤器><action android:name="android.intent.action.MAIN";/><category android:name="android.intent.category.LAUNCHER";/></意图过滤器></活动><!-- 示例 AdMob 应用 ID:ca-app-pub-3940256099942544~3347511713 --><元数据android:name="appname"android:value=ca-app-pub-2703074771097768~4557375307"/>.</应用程序>
我遇到了类似的问题
ParseError at [row,col]:[8,279]消息:http://www.w3.org/TR/1999/REC-xml-names-19990114#AttributeNSNotUnique?androidx.constraintlayout.widget.ConstraintLayout&layout_width&http://schemas.android.com/apk/res/安卓
您需要做什么:
首先仔细阅读错误消息,在我的情况下,它在错误消息中提到有问题:ConstraintLayout&layout_width
属性在我最新的布局 xml 文件中.
就我而言,我错误地添加了
<块引用>layout_height
<块引用>
layout_width
归因于
<块引用><布局
标签,实际上仅用于数据绑定.因此,只需删除这些行,我就能解决这个问题.
要重新生成此问题,请执行以下操作:
为了解决这个问题,我做了:
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 its 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
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.
TO RE-GENERATE THIS ISSUE DO AS MENTIONED BELOW:
<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">
这篇关于ParseError at [row,col]:[66,34] 消息:-xml-names-19990114#AttributeNSNotUnique?Button&layout_column的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!