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

时间:2021-07-10 03:47:49

标签: android flutter flutter-dependencies

这是在完成步骤 here

之后

我按照上述步骤操作后不断收到此错误“解析LocalFile时出错:'/home/user/Projects/xylophone-flutter/android/app/src/main/AndroidManifest.xml'请确保android manifest 是一个有效的 XML 文档,然后重试。"

我使用的是最新的 audioplayers dart 软件包,需要升级。按照文档中的步骤操作后,我偶然发现了这个错误。我已经检查并检查了我的语法,我的 IDE 没有显示任何问题区域。我不确定我错过了什么。非常感谢任何帮助或反馈。

这是我的 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
    >
`

0 个答案:

没有答案