我在AndroidManifest.xml中收到很多错误。我该如何解决?

时间:2020-09-17 14:26:39

标签: flutter dart

以下是我的代码: 我得到的错误是:

  1. 未解决的类'FlutterApplication'
  2. 此处不允许使用android:icon属性
  3. 未解决的类'MainActivity'
  4. 此处不允许使用android:launchMode属性
  5. 此处不允许使用android:theme属性
  6. 此处不允许使用android:configChanges属性
  7. 此处不允许使用android:hardwareAccelerated属性
  8. 此处不允许使用android:windowSoftInputMode属性

<!-- 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
    android:name="io.flutter.app.FlutterApplication"
    android:label="BMI Calculator"
    android:icon="@mipmap/bmi_calculator">
    <activity
        android:name=".MainActivity"
        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="io.flutter.app.android.SplashScreenUntilFirstFrame"
            android:value="true" />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
</application>

0 个答案:

没有答案