After uninstall app on device flutter run not work

5.2k views Asked by At

I'm using vs code for building my flutter app. But after uninstall debug app on my device, 'flutter run' command not working properly and stop in installing status. Please help me. Thanks.

Launching lib/main.dart on RNE L21 in debug mode...
Initializing gradle...                                      ۱۱٫۷s
Resolving dependencies...                                   ۱۴٫۹s
Gradle task 'assembleDebug'...
Gradle task 'assembleDebug'... Done                         ۱۰۱٫۷s
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...                  ۶٫۱s
3

There are 3 answers

0
Coated On

Had the same problem, copied .apk file on device and installed it from there, after that debugger worked without any issues.

0
Kunchok Tashi On

It seems like when you uninstall the flutter application, though it is no longer available on the phone It is not deleted properly(Only in the flutter case). Therefore to fix this. you can run adb and uninstall from the package. Here is a step-by-step procedure.
If you are in windows:
Step 1. Open your SDK path in command prompt
eg.
C:\Users\kharag\AppData\Local\Android\Sdk\platform-tools

Step 2. Search your app package name from the flutter app (It will be in AndroidManifest.xml)
eg.
com.mycodingchannel.icttapp
Step 3. Now uninstall your app by running the command:

adb uninstall com.mycodingchannel.icttapp   

That's all, Now run your app and it should work. Thanks

0
Karthik M On

Once you see Built/..... in termial. The apk has been created. Now if the installing fails/takes long time. Go to [app folder\app\outputs\apk]

Copy the app.apk/debug.apk any other file to your device and install it. Now once you re-run it will work fine.

If that doesn't work flutter clean+flutter pub get. Follow the above step.