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
Installing build\app\outputs\apk\app.apk... is displayed in the Run tab and it doesn't give much information. Please have a look into the Logcat tab and here you can find detailed logs and you may find the reason why you are stuck. If Logcat tab is not visible, please refer this link: Android Studio not showing Logcat with Flutter
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);
}
}
If this problem persists in your physical device follow the below operation
Select the app from the apps list in settings (You could see a "not installed for this user" sub along side it)
then
Top right menu button "uninstall for all users"
For me, this error occurs when I add the google firebase in my project, I tried all of the above solutions but not solved the problem, At the end, I could solve this problem by installing the latest version of the Android API virtual device and google play services.
For me, the error was due to my work android profile. I uninstalled the debug app in personal profile but it remained in the work profile, once I uninstalled it there and ran flutter run. It worked without any issues. So, First, ensure you deleted the App in both personal and work profile And then run
flutter run
By profiles I meant, android user profiles on your phone.
On your real Android Device GO to SETTINGS> APPS & NOTIFICATION(you can search it!) > APP INFO > chose the app of the current project > PRESS THE 3 dots > Uninstall for all user.