Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 需要将您的应用程序迁移到Android嵌入v2。。。。。。如何解决这个问题?_Flutter_Dart_Github_Flutter Dependencies - Fatal编程技术网

Flutter 需要将您的应用程序迁移到Android嵌入v2。。。。。。如何解决这个问题?

Flutter 需要将您的应用程序迁移到Android嵌入v2。。。。。。如何解决这个问题?,flutter,dart,github,flutter-dependencies,Flutter,Dart,Github,Flutter Dependencies,它一直在告诉我 需要将您的应用程序迁移到Android嵌入v2。按照上的步骤操作 注意……与以下步骤相同 但我让任何一个不能遵循这些步骤的人都能更容易地做到……希望这能有所帮助 在尝试了多种应对方式后 我最终找到了一个足够好的解决方案 只需在您的项目中打开此文件并复制>>粘贴此代码行,它就会工作。……请确保删除此文件中的所有代码行,并将其替换为新代码行 1:MainActivity.java package co.appbrewery.flash_chat 导入io.flatter.embed

它一直在告诉我 需要将您的应用程序迁移到Android嵌入v2。按照上的步骤操作

注意……与以下步骤相同 但我让任何一个不能遵循这些步骤的人都能更容易地做到……希望这能有所帮助

在尝试了多种应对方式后

我最终找到了一个足够好的解决方案

只需在您的项目中打开此文件并复制>>粘贴此代码行,它就会工作。……请确保删除此文件中的所有代码行,并将其替换为新代码行

1:MainActivity.java


package co.appbrewery.flash_chat

导入io.flatter.embedding.android.flatterActivity

公共类MainActivity扩展了公共类MainActivity{

}


2:styles.xml



@可绘制/发布背景

3:AndroidManifest.xml





按照以下步骤操作。希望你的问题能解决

您将获得一个选项,其中包含如何解决问题的说明。但是你问如何解决这个问题?是的,谢谢你……我只是给出了一个答案,让任何人都比遵循这些步骤更容易……我想也许任何人都比遵循这些步骤更容易。没关系。那么你应该投我建议的赞成票
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
    <item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"   
   package="co.appbrewery.flash_chat">  
<!-- 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="flash_chat" android:icon="@mipmap/ic_launcher">
    <activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" 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.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" />
        <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>