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

后端 未结 30 1860
盖世英雄少女心
盖世英雄少女心 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:10

    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)

    0 讨论(0)
  • 2020-12-08 14:10

    I had this problem after I changed the package name. I fixed it by using this guide

    In my case I did not have the java files as described in the article but did need to change the kotlin path similarly to the java path described.

    0 讨论(0)
  • 2020-12-08 14:12

    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 :).

    0 讨论(0)
  • 2020-12-08 14:12

    I fixed it:

    1. Power off & Close Android Emulator
    2. Reopen Android Studio & go to Tools/ AVD Manager
    3. In Virtual Devices List, click Dropdown icon > select 'Wipe Data'. Then click 'Launch this AVD...'
    4. Waiting for VD open, then click Run in Android Studio
    
    

    good luck

    0 讨论(0)
  • 2020-12-08 14:13

    Running flutter clean solved this issue for me using an emulator.

    I wiped the emulator data, deleted my emulator, and created a new one, none of that worked. flutter clean worked though.

    0 讨论(0)
  • 2020-12-08 14:15

    Try this

    1. First Install App using flutter run from terminal
    2. When App is Installed. long press on app icon and go to app info.
    3. Force stop app.
    4. Remove cache and delete storage which is contained by app.
    5. Uninstall App.
    6. Install Again. it will work.
    0 讨论(0)
提交回复
热议问题