简体   繁体   English

我的flutter项目升级到最新版本后出现AndroidManifest.xml错误

[英]AndroidManifest.xml error after upgrading to the latest version in my flutter project

This was after going through the steps here这是在完成此处的步骤之后

I keep getting this error after following the steps above "Error parsing LocalFile: '/home/user/Projects/xylophone-flutter/android/app/src/main/AndroidManifest.xml' Please ensure that the android manifest is a valid XML document and try again."按照上述步骤“解析 LocalFile 时出错:'/home/user/Projects/xylophone-flutter/android/app/src/main/AndroidManifest.xml' 请确保 android 清单是有效的 XML 文档后,我一直收到此错误然后再试一次。”

I'm using the latest audioplayers dart package, which requires the upgrade.我使用的是最新的音频播放器dart package,需要升级。 After following the steps in the documentation I have stumbled across this error.按照文档中的步骤操作后,我偶然发现了这个错误。 I've gone through and checked my syntax, and my IDE doesn't show any problem areas.我已经完成并检查了我的语法,我的 IDE 没有显示任何问题区域。 I'm not sure what I'm missing.我不确定我错过了什么。 Any help or feedback is greatly appreciated.非常感谢任何帮助或反馈。

Here is my AndroidManifest.xml code: `这是我的 AndroidManifest.xml 代码:`

<!-- The INTERNET permission is required for development. Specifically,
     flutter needs it to communicate with the running application
     to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>

<!-- io.flutter.app.FlutterApplication is an android.app.Application that
     calls FlutterMain.startInitialization(this); in its onCreate method.
     In most cases you can leave this as-is, but you if you want to provide
     additional functionality it is fine to subclass or reimplement
     FlutterApplication and put your custom class here. -->
<application>
</application>
    <activity
        android:name="io.flutter.embedding.android.FlutterActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        <!-- This keeps the window background of the activity showing
             until Flutter renders its first frame. It can be removed if
             there is no splash screen (such as the default splash screen
             defined in @style/LaunchTheme). -->
        <meta-data
            android:name="flutterEmbedding"/>
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
</application
    >
` `
<uses-permission android:name="android.permission.INTERNET"/>

<!-- io.flutter.app.FlutterApplication is an android.app.Application that
     calls FlutterMain.startInitialization(this); in its onCreate method.
     In most cases you can leave this as-is, but you if you want to provide
     additional functionality it is fine to subclass or reimplement
     FlutterApplication and put your custom class here. -->
<application
    android:label="xylophone"
    android:icon="@mipmap/ic_launcher">
    <activity
        android:name=".MainActivity" android:exported = "true"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        <!-- This keeps the window background of the activity showing
             until Flutter renders its first frame. It can be removed if
             there is no splash screen (such as the default splash screen
             defined in @style/LaunchTheme). -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
</application>

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

相关问题 升级 agp 后在 aar 文件的 AndroidManifest.xml 中找不到版本代码 - Version code not found in aar file's AndroidManifest.xml after upgrading agp AndroidManifest.xml中的错误 - Error in AndroidManifest.xml 错误 androidmanifest.xml - error androidmanifest.xml 在我的 Flutter 项目中,在 AndroidManifest.xml 中添加 Browsable 类别使我的应用程序无法使用 - In my Flutter project, adding a Browsable category in AndroidManifest.xml makes my app unusable Flutter - AndroidManifest.xml 在 Flutter 升级后损坏 - Flutter - AndroidManifest.xml corrupted after Flutter Upgrade 如何在Library Project中从AndroidManifest.xml获取版本? - How to get Version from AndroidManifest.xml in a Library Project? 在AndroidManifest.xml / properties.project中设置Android版本的指南 - Guidance on setting Android version in AndroidManifest.xml/properties.project 如何解决我的 flutter 应用程序的 androidmanifest.xml 中的此 firebase 消息传递错误? - How do I resolve this firebase messaging error in the androidmanifest.xml of my flutter application? 将AndroidManifest.xml添加到Project后如何将应用程序部署到移动设备 - How to deploy an app to mobile after adding AndroidManifest.xml to Project Flutter App 中的 AndroidManifest.xml 错误“未找到属性 class” - Error in AndroidManifest.xml in Flutter App "Attribute class not Found"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM