Flutter stuck at Installing build\app\outputs\apk\app.apk

后端 未结 30 2003
盖世英雄少女心
盖世英雄少女心 2020-12-08 13:21

when I run

$ flutter run

I\'m getting a prompt on my mobile device asking if I want to install the app on my device. I give yes, then nothing

30条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 14:16

    I also have this problem because I changed a file (my_project\android\app\src\main\java\com\example\my_project\MainActivity.java). and I solved it like this:

    package com.example.my_project; //your project name should be changed here.
    
    import android.os.Bundle;
    import io.flutter.app.FlutterActivity;
    import io.flutter.plugins.GeneratedPluginRegistrant;
    
    public class MainActivity extends FlutterActivity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        GeneratedPluginRegistrant.registerWith(this);
      }
    }
    

提交回复
热议问题