preface
At the beginning of the development of flutter, there are all kinds of problems. At this time, it is a little difficult for the developers who have just contacted the development of flutter. Therefore, in the early stage of the development of flutter, we should accumulate more, consult more and step on more holes, so that we can start to develop the flutter project quickly. This article will share a relatively simple problem encountered in the development of flutter, the error prompted after the operation of flutter packages get.
Error message
After running the flutter packages get, the flutter project will prompt the following error prompt:
After executing the command flutter packages get, an error is reported. It is about the Android related prompt in the flutter project
Error parsing LocalFile: '/Users/xxx/xxxxxx/android/app/src/main/AndroidManifest.xml' Please ensure that the android manifest is a valid XML document and try again.
exit code 1
analysis
Through the above error prompt, the editor has told the specific location of the error file, so follow the file path of the prompt and enter the corresponding file to check the specific location of the error. However, after checking, no error is found. After performing the flitter clean, the editor runs the flitter run again, and the error is still reported. The corresponding writing method of the specific file is as follows:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.platform_app">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:name="io.flutter.app.FlutterApplication"
android:label="platform_app">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
Through repeated investigation, we finally found out the problem, label & lt/ manifest> The end tag of is missing one, as shown in the following figure:
resolvent
In & gt; And then it was lost android:icon= “@mipmap/ic_ So it should be like this:
<application
android:name="io.flutter.app.FlutterApplication"
android:label="platform_app"
android:icon="@mipmap/ic_launcher">
<activity...
Finally, click save file, run the project again, and no error will be reported directly. The project flutter is successfully started, and the problem is perfectly solved.
The above is the whole content of this chapter. Welcome to WeChat official account of the three shopkeeper, “program ape by three shopkeeper”, three shopkeeper’s Sina micro-blog “three shopkeeper 666”, welcome to pay attention!
Three WeChat’s official account:
Sina Weibo of three shopkeepers:
div>
Read More:
- Idea can’t find the solution of XML configuration by running project prompt through external Tomcat
- [error record] Android App packaging error (entry name ‘assets / xxx. XML’ merged)
- ./src/App.js Line 13:11: Parsing error: Unterminated JSX contents (react)
- Android android.intent.category Purpose and use of. Launcher
- Activity of Android studio_ main.xml Unable to preview (gray page)
- Android: How to Solve Execution failed for task ‘:app:compileDebugJavaWithJavac‘. > javax/xml/bind/JAXBException
- Research on Maven management of Java project pom.xml The jar package error is reported, but the project is running normally
- When jar file is running: Failed to load Main-Class manifest attribute from ……Solution
- Solve the error reported by Android studio directly running java.main
- Error running app:Instant Run requires Tools | Android Enable ADB integration‘ to be enabled.
- org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘com/hujin
- (transfer) using Wireshark package capture software to prompt the NPF driver isn’t running solution
- Error in reading XML file IOException parsing XML document from URL
- The reason and solution of Android intent value not updated
- Error: Error parsing D:\new_android\Android SDK\system-images\android-25\android-wear\armeabi-v7a\de
- Error parsing Mapper XML. The XML location is ‘file
- [building the flutter environment] error: the flutter directory is not a clone of the GitHub project
- Mobile app development: installation and configuration of react native
- Integrate native IOS plug-ins into the flutter project
- Win10 (1703) app store download app prompt error code 0x80d0000a