简体   繁体   English

错误:不支持XML版本“2.0”,仅支持XML 1.0

[英]Error:XML version “2.0” is not supported, only XML 1.0 is supported

I have tried updating my app to newer version to publish it to google play store, however when I change the version and generate the signed APK I get this error: Error:XML version "2.0" is not supported, only XML 1.0 is supported. 我已尝试将我的应用更新到较新版本以将其发布到Google Play商店,但是当我更改版本并生成签名的APK时,我收到此错误:错误:不支持XML版本“2.0”,仅支持XML 1.0。 I have absolutely no idea what could be causing it. 我完全不知道是什么导致它。 Can anyone point me in the right direction or at least tell me where I should find what's wrong?? 任何人都可以指出我正确的方向或至少告诉我在哪里我应该找到什么是错的?

Open your manifest file and change xml version from 2.0 to 1.0. 打开清单文件,将xml版本从2.0更改为1.0。 It should run properly now. 它应该现在正常运行。

<?xml version="2.0" encoding="utf-8"?>

to

<?xml version="1.0" encoding="utf-8"?>

I faced this problem before, so the solution is here. 我之前遇到过这个问题,所以解决方案就在这里。

Try to increase your versionCode and change your versionName in gradle file only. 尝试增加versionCode并仅在gradle文件中更改versionName。

Do not increase the version in manifest file. 不要增加清单文件中的版本。

versionCode 2 // an example (if the previous one was 1) versionCode 2 //一个例子(如果前一个是1)

versionName 1.1 // an example (if the previous one was 1.0) versionName 1.1 //示例(如果前一个是1.0)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我只得到 <?xml version=“1.0” standalone=“no”?> 什么时候要求xml文件? 安卓系统 - Why am I only getting <?xml version=“1.0” standalone=“no”?> when request for a xml file? Android 如何解析Android 4.0中支持的xml? - How to parse xml that is supported in Android 4.0? Unity错误:支持的最低Gradle版本为5.1.1 - Unity Error: Minimum supported gradle version is 5.1.1 支持的蓝牙版本 - Supported Bluetooth Version <Tag> Kitkat版本不支持 - <Tag> is not supported in Kitkat version 错误:支持的最低 Gradle 版本为 5.6.4。 当前版本是 5.2.1 - ERROR: Minimum supported Gradle version is 5.6.4. Current version is 5.2.1 Android和Google App Engine:是否提供受支持的XML绑定工具? - Android and Google App Engine: supported XML Binding Tool available? iOS和Android是否支持XML的UTF-16文本编码 - Is UTF-16 text encoding for XML supported by iOS and Android 如何从视图中提取受支持的XML元素和属性? - How to extract supported XML Elements and Properties from a View? 二进制 XML 文件第 24 行:AdapterView 不支持 addView(View, LayoutParams) - Binary XML file line #24: addView(View, LayoutParams) is not supported in AdapterView
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM