将Flutter项目迁移到AndroidX后,我的AndroidManifest.xml中出现13个错误,需要帮助

时间:2019-07-07 13:34:38

标签: flutter migration android-manifest androidx

enter image description here

我有一个扑扑的项目,在其中添加了依赖项Multi_image_Picker,运行应用程序时,它停止了响应

  

解决依赖性

。并且控制台显示错误,要求我将项目迁移到AndroidX。

我使用了此链接中的说明,以迁移到AndroidX。我使用了选定的答案。前3个步骤无法解决问题,因此我进入了4个步骤,一直到最底层。

我这样做了,但是尽管我仍然可以在模拟器和真实设备上运行该应用程序,但是当我尝试提交项目并预览错误和警告时,我遇到了关于AndroidManifest.xml的13条错误。

恐怕如果稍后在为Google Play上传的应用程序进行编译时提交带有这些错误的项目,我可能会出错。

AndroidMinifest用红色显示几行代码,并显示以下错误:

Error:(1, 2) Cannot find the declaration of element 'manifest'.
Error:(1, 26) URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs).
Error:(13, 26) Unresolved package 'flutter'.
Error:(13, 34) Unresolved package 'app'
Error:(13, 38) Unresolved class 'FlutterApplication'.
Error:(15, 9) Attribute android:icon is not allowed here.
Error:(19, 28) Unresolved class 'MainActivity'.
Error:(20, 13) Attribute android:launchMode is not allowed here.
Error:(21, 13) Attribute android:theme is not allowed here.
Error:(22, 13) Attribute android:configChanges is not allowed here.
Error:(23, 13) Attribute android:hardwareAccelerated is not allowed here.
Error:(24, 13) Attribute android:windowSoftInputMode is not allowed here.
Error:(38, 3) Cannot find the declaration of element 'manifest'.

1 个答案:

答案 0 :(得分:1)

只需提交错误即可。提交应用程序后,这些错误不会在Google Play商店中引起问题。