美文网首页
flutter和原生混合是报错问题之must be called

flutter和原生混合是报错问题之must be called

作者: kot_flu | 来源:发表于2019-03-20 14:45 被阅读0次

不要轻易的去修改manifest.xml 里面的启动配置

<application
        android:name="io.flutter.app.FlutterApplication"
        android:allowBackup="true"
        android:label="flutter_videoshows"
        tools:replace="android:label"
        android:icon="@mipmap/ic_launcher">
        <!-- android:theme="@style/VideoTheme"-->
        <!-- android:theme="@style/LaunchTheme"-->
        <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>

尤其是这个

android:name="io.flutter.app.FlutterApplication"

和这个启动主题

android:theme="@style/LaunchTheme"

如果是有自己的application ,想办法去继承就好

相关文章

网友评论

      本文标题:flutter和原生混合是报错问题之must be called

      本文链接:https://www.haomeiwen.com/subject/vnwzmqtx.html