Flutter stuck at Installing build\\app\\outputs\\a

2019-04-10 14:56发布

问题:

when I run

$ flutter run

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

It's stuck here

Launching lib/main.dart on POCO F1 in debug mode...
Initializing gradle...                                           1.5s
Resolving dependencies...                                        9.2s
Gradle task 'assembleDebug'...                                  22.9s
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...                     14.9s

Then nothing.

回答1:

For me the error was due to my work android profile. I uninstalled the debug app in personal profile but it remained in 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

Update:

By profiles I meant, android user profiles on your phone.



回答2:

I solved this by manually installing the apk file generated in the builds folder. After that running flutter run runs the app on my phone.



回答3:

I ran into this issue after changing my package name. Following the instructions on this post helped me: Flutter App is not working after changing package name



回答4:

I hit this problem when I commented all my bitmaps in launch_background.xml:

<!-- You can insert your own image assets here -->
<item>
<!--
    <bitmap
        android:gravity="center"
        android:src="@mipmap/launch_320x480" />
    <bitmap
        android:gravity="center"
        android:src="@mipmap/launch_480x320" />
    <bitmap
        android:gravity="center"
        android:src="@mipmap/launch_480x800" />
    <bitmap
        android:gravity="center"
        android:src="@mipmap/launch_800x480" />
    <bitmap
        android:gravity="center"
        android:src="@mipmap/launch_720x1280" />
    <bitmap
        android:gravity="center"
        android:src="@mipmap/launch_1280x720" />
    <bitmap
        android:gravity="center"
        android:src="@mipmap/launch_1280x1920" />            
    <bitmap
        android:gravity="center"
        android:src="@mipmap/launch_1920x1280" />  
-->          
</item>

I uncommented the bitmaps to get the Flutter build to run. I'm on:

Flutter (Channel beta, v1.0.0, on Mac OS X 10.13.6 17G4015, locale en-US)



回答5:

For anybody reading this, I solved this by doing the following:

  1. Open Android Studio->SDK Manager and install API 27 (By default Android Studio only installed the latest (API 28) as at the time of writing and there seem to be issues with using that right now).
  2. In cmd run flutter doctor --android-licenses and make sure you accept all the licenses.
  3. Open Android Studio->AVD Manager and create a new emulator using API 27
  4. Run your app on the new emulator and enjoy!

Hope this helps :).



回答6:

I had a problem with this when I uninstalled my app from a device, but unfortunately, I didn't uninstall it from all the users that are on my phone. Even Guest kept a version of my app in it, so I solve this issue with uninstalling all version of my app for all users. After that my app was installed without a problem. Sadly we don't get any error message that something is not right if this happens, so I hope this was a case for you guys and that I help you solve it with this! ;)



标签: dart flutter