0

I am trying to lunch my flutter application on my mobile but When I run

flutter run  --verbose

I got this error :

   +2 ms] Stopping app 'app.apk' on SM A315G.
[        ] executing: /mnt/SSDP/Sdk/android/platform-tools/adb -s RR8R107K94E shell am force-stop com.parsapp
[  +60 ms] executing: /mnt/SSDP/Sdk/android/platform-tools/adb -s RR8R107K94E shell pm list packages com.parsapp
[  +92 ms] Installing APK.
[   +2 ms] Installing build/app/outputs/flutter-apk/app.apk...
[        ] executing: /mnt/SSDP/Sdk/android/platform-tools/adb -s RR8R107K94E install -t -r /mnt/SSDP/Project/Casp/mobileapplication/build/app/outputs/flutter-apk/app.apk
[+5134 ms] Performing Streamed Install

           adb: failed to install /mnt/SSDP/Project/Casp/mobileapplication/build/app/outputs/flutter-apk/app.apk:
[        ] Installing build/app/outputs/flutter-apk/app.apk... (completed in 5.1s)
[   +1 ms] Error: ADB exited with exit code 1
[   +1 ms] Performing Streamed Install

           adb: failed to install /mnt/SSDP/Project/Casp/mobileapplication/build/app/outputs/flutter-apk/app.apk:
[        ] Warning: Failed to install APK.
[        ] Error launching application on SM A315G.
[   +4 ms] "flutter run" took 36,587ms.
[   +3 ms] 

In mobile developer Option

  1. USB debugging is on
  2. Verify apps over USB is on
  3. Verify bytecode of debuggable apps is off
  4. I have enough space (more than 100 gig free space)

and I choose Transfer images

When I choose Transfer files the lunch process remain in this level :

 [   +2 ms] Stopping app 'app.apk' on SM A315G.
[        ] executing: /mnt/SSDP/Sdk/android/platform-tools/adb -s RR8R107K94E shell am force-stop com.parsapp
[  +61 ms] executing: /mnt/SSDP/Sdk/android/platform-tools/adb -s RR8R107K94E shell pm list packages com.parsapp
[  +83 ms] Installing APK.
[   +2 ms] Installing build/app/outputs/flutter-apk/app.apk...
[        ] executing: /mnt/SSDP/Sdk/android/platform-tools/adb -s RR8R107K94E install -t -r /mnt/SSDP/Project/Casp/mobileapplication/build/app/outputs/flutter-apk/app.apk

But I can't lunch application on my mobile phone.

This is flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, 2.0.6, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] VS Code (version 1.56.2)

I am using FVM. And my mobile android version is 11.

When I run adb install /mnt/SSDP/Project/Casp/mobileapplication/build/app/outputs/flutter-apk/app.apk stuck at Performing Streamed Install.

Cyrus the Great
  • 5,145
  • 5
  • 68
  • 149

2 Answers2

0

you flutter channel is unknown .

the version is unknown and seems to be on web developer mode so

if you are using it for android devices , it is better to switch to

flutter channel stable

after that

flutter upgrade

and then flutter run

austin
  • 517
  • 5
  • 16
0

I finally fix the problem :

Run flutter doctor -v If you got insufficient permissions for device error you should this tricks:

  1. According official site

If you see an error message that says you're not in the plugdev group, you'll need to add yourself to the plugdev group:

sudo usermod -aG plugdev $LOGNAME

and then:

The android-sdk-platform-tools-common package contains a community-maintained default set of udev rules for Android devices. To install:

apt-get install android-sdk-platform-tools-common
  1. If above tips not works then:

    adb kill-server

and then start adb with super user or use sudo

sudo adb start-server

Done :-)

Cyrus the Great
  • 5,145
  • 5
  • 68
  • 149