App installation error : Flutter ADB exited - flutter

I m getting below error after successful build of every flutter app .
Plz share the way to resolve it
"Installing build\app\outputs\flutter-apk\app.apk... 7.0s
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install C:\projectss\downloader\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]
Error launching application on M2006C3MII."

Do check that install via usb option is selected on your developer option.
if it still not works, then revoke usb authorisations unplug your device and plug it..and select MTP or file transfer from charging tray this one works for me

Clear Your mobile storage and try reinstalling it again. flutter apps take a lot of storage when building .
I recommend at least 1GB of free space before installing the app

Related

Fuchsia OS Failed to start the emulator

I am trying to install fuchsia and it was downloaded perfectly , but when I tried to start the emulator , it popped waiting for emulator to start and then it failed, giving error
device, health check failed . Unable to ssh due to error : exit status 2
Then, when I checked the log file for error:
It showed This application failed to start because no QT platform plugin could be initialized. Reinstalling application may fix the problem.
#I have tried to reinstall 2-3 times, tried every possible thing, qt was installed properly even qtcreator was working, still while running fuchsia same error is coming
Any answers?Any solution

Build error while running the native script application

Migrating my native script application to 8.1.5 version.
Fixed the errors that occurs when migrating the native script application.
Application build successfully in the emulator. After build successfully getting error in the application.
How to fix this issue?
Try this:
Go to AVD Manager, and click wipe data on the selected emulator:
Restart your machine (adb connection might be lost).
Then restart your project by running:
ns clear
ns run android
If that doesn't open the app on the emulator, run:
ns devices
Spot the emulator ID you want to run the app on
ns build android
ns deploy --device EMULATOR-ID
Note:
Make sure you've done all 4 blue steps in the cli message (in blue).

Got the "Error launching application on" after flutter run

I am flowing the official tutorial to install flutter and run the default app on my iPhone Device. After I execute the flutter run, the app is installed and launched on my iPhone but the logs show the bellow error. How do I solve it?
Launching lib/main.dart on My iPhone 6 in debug mode...
Automatically signing iOS for device deployment using specified development team
in Xcode project: XXXXXXXXXX
Running Xcode build...
└─Compiling, linking, and signing... 50.2s
Xcode builds done. 90.1s
Installing and launching... 41.1s
Error launching the application on My iPhone 6. <-- Error Here
It happens that there are some process needed to Flutter plugin correctly run on physical devices. I struggled with that and finally found that the processes idevicesyslog and iproxy were being silently blocked by MacOS.
You may have noticed already a message liked this:
or a similar one for idevicesyslog.
Once I went to System Preferences -> Security & Privacy in General tab and allowed this apps, everything works. Note that this screen shows only the last app that you tried to run. So I'd recommend that you run flutter app with preferences opened so you can (hopefully) see the messages appearing and click allow.
MacOS may warn you one more time about the file being downloaded from the internet. Just click open and you're good.
The error do not show again after reboot the iPhone.
Same error -- Running fine through Xcode, when I ran with flutter CLI, the app would open, but the terminal log output would crash with the error as in the post.
I ran flutter update and simultaneously turned iPhone off and back on. After doing that, the below popup appeared (on mac).
I believe after the install finished, I ran the below (which I ran several times before updating flutter and installing the popup):
flutter clean
rm -rf ios/Pods
flutter pub get
cd ios && pod install && cd ..
run the flutter app using flutter run from command line, then the MacBook will ask for permission to open the app and app runs,
(lldb) warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance.
Error launching application on device-XXXXX.
Building & Replace with a newest version ios-deploy solved problems list aboved. Flutter SDK bundled a pre-built command ios-deploy in __PATH_TO_YOUR_Flutter_SDK_/bin/cache/artifacts/ios-deploy/, just replace it.
Please reference to: Flutter Error launching application on device issue .

First Flutter App stuck at “Running Gradle task 'assembleDebug'… ” in Llnux Mint

I'm getting the following error while running my first flutter app in the terminal
Launching lib/main.dart on vivo 1802 in debug mode...
Running Gradle task 'assembleDebug'...
(This is taking an unexpectedly long time.)
I already tried downloading the gradle distribution separately and copy pasting it in my project's gradle wrapper and restarting android studio but it still doesn't resolve the issue.
I'm using Linux Mint 19.
Make sure you have an internet connection.When running an app for the first time, gradle needs to download some additional content
Check your connection to your virtual phone or your phone well. Make sure it doesn't disconnect while you are running the app
Before starting this building process, make sure:
USB debugging is enabled on your phone,
No app is currently running (and you are on your home screen),
While running your app for the first time on a phone, your phone will get a pop-up asking you to allow the installation of apps via USB.
Click 'allow' on it.
Not clicking 'allow' or simply ignoring it will make it seem like the build process is never-ending.

How to prevent launch Ionic app on emulator

I'm working on ionic App and I'm trying to run App on real Android device, But when I run ionic run android in terminal, I get the following error:
Running command: "C:\Program Files (x86)\nodejs\node.exe"
D:\wamp\www\pars-app\pars-app\hooks\after_prepare\010_add_platform_class.js
D:\wamp\www\pars-app\pars-app
add to body class: platform-android
ANDROID_HOME=D:\Sdk\android-sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_45
No target specified, deploying to emulator
ERROR running one or more of the platforms: No emulator images (avds)
found.
1. Download desired System Image by running: "D:\Sdk\android-sdk\tools\android.bat" sdk
2. Create an AVD by running: "D:\Sdk\android-sdk\tools\android.bat" avd HINT: For a faster emulator, use an Intel System Image and install
the HAXM device driver
You may not have the required environment or OS to run this project
How to prevent run app on windows emulator? I want to run app on real device that conected to my computer.
I am using windows 8 and Huawei with Android 4.2.2
::note
I have read these questions, But I didn't got the answer!
Why not work Ionic app testing on android real device?
Ionic run android does not run app on device
ionic run android - configurations not running app on device
As a complement to #OClyde answer, you could try :
adb kill-server
adb start-server
To have infos about these commands :
adb --help
Nb : Sometimes, for a reason i do not know, the connection between my phone and the computer break. Running this fixes it.
To make sure that your app is not installed to an emulator but to your device, take the following steps:
Open up your console and run adb devices. This should give you a list of all devices available (real devices as well as running emulators) to the Android Debug Bridge. If the adb command is not recognized check that you have installed the Android SDK correctly and that you've set all the necessary environment variables accordingly.
The adb devices command might give you output similar to this:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
This indicates that the ADB wasn't ready before, so in this case just try to un- and replug your device and run adb devices again to see if the device is listed afterwards.
If your device is still not showing, check that USB Debugging is enabled on your device. Therefore you first have to enable developer settings, which you can do by tapping the build number (Settings => About Phone) 7 times (no, that's not a joke ;) ). After that, you'll have the developer options in your settings menu. Open these and check "USB Debugging"
If still your device isn't recognized by the ADB, change the USB connection mode. You can either do this in the developer options as well or tap the notification shown when the phone is connected to your PC. Try MTP as well as PTP, on of those should do the job.
After these steps, it should be nearly impossible that the device is still not recognized by your PC. As soon as there is a phone available, Ionic will install the app on the phone automatically instead of launching an emulator.