4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

1.12より前のAndroidプロジェクトのアップグレード方法 (requires your app to be migrated to the Android embedding v2. flutter の対処方法)

Last updated at Posted at 2021-03-17

ステップ1

MainActivity.java
import android.os.Bundle;
import io.flutter.app.FlutterActivity ;
import io.flutter.plugins.GeneratedPluginRegistrant;

public class MainActivity extends FlutterActivity{}メソッド内の

MainActivity.java
@Override
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  GeneratedPluginRegistrant.registerWith(this);
}

を消す。

ステップ2

MainActivity.java
import io.flutter.embedding.android.FlutterActivity;

を追加。

AndroidManifest.xml
android : name="io.flutter.app.FlutterApplication" 
AndroidManifest.xml
<meta-data>

を消す。

ステップ3

AndroidManifest.xml
  <!-- Specify that the launch screen should continue being displayed -->
  <!-- until Flutter renders its first frame. -->
  <meta-data
    android:name="io.flutter.embedding.android.SplashScreenDrawable"
    android:resource="@drawable/launch_background" />

を追加。

ステップ4

AndroidManifest.xml
<meta-data
  android:name="flutterEmbedding"
  android:value="2" />

を追加。

引用
(https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects)

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?