[英]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.