Reputation: 1223
I'm getting the following error when running my flutter project on Android Emulator. It works fine on iOS Simulator and the project is also fine on my other Mac (runs on both Android and iOS Simulator)
Error: ADB exited with exit code 1 Performing Streamed Install
adb: failed to install /Users/xxxx/Dropbox/Flutter/test_app/build/app/outputs/apk/app.apk: Error launching application on Android SDK built for x86.
I've cleaned my project and reset my emulator but no luck. It only affects my mac book pro android build.
Flutter doctor also shows no issues
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[!] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
✗ Verify that all connected devices have been paired with this computer in Xcode.
If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
To update with Brew, run:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
[✓] Android Studio (version 3.4)
[✓] Connected device (2 available)
Upvotes: 44
Views: 180071
Reputation: 13
If you are using MIUI. Turn off the MIUI optimization. For this: Settings > Developer options > MIUI optimisation
Upvotes: 0
Reputation: 11
I have been struggling with this off and on for a year, here is what I just noticed that makes it work or not work on my system.
I discovered tonight that if I have my virus protection running my emulator stalls in the
" ---> Built build\app\outputs\apk\debug\app-debug.apk.
and I just get a white screen. I turn off the virus protection and it works fine in debug mode.
If its on I have to keep going to the terminal and doing: " flutter run " to see any changes I have made.
Upvotes: 1
Reputation: 41
Android Studio> More Actions> Virtual Device Manager> Wipe Data
This mistake's reason is emulator's storage is full. This solution is worked for me.
Upvotes: 0
Reputation: 289
Just Reinstall ADB on Mac
brew install android-platform-tools
And try again, It worked for me
Upvotes: 0
Reputation: 73
this worked for me:
go to android studio and click tools > sdk manager and check the one you need
Upvotes: 0
Reputation: 400
Solution:
Upvotes: 0
Reputation: 293
You can apply some simple steps
flutter clean
flutter pub cache repair
or manually
example
finally
flutter pub get
flutter run
i'pe your problem will solved!
Upvotes: 0
Reputation: 3274
(worth trying quickly before attempting more complex solutions)
Run this command to clean out your build/dependencies:
flutter clean
Then run this command to fetch your dependencies again:
flutter pub get
Now try running your project! (flutter run
)
Upvotes: 34
Reputation: 616
I had Universal ADB Driver
installed in my system for fastboot and stuff. I uninstalled and it worked for me.
Also I had to delete adb
directory from root to remove it completely.
Upvotes: 0
Reputation: 325
I fixed my error by running below code lines because Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE] is mentioned in the error
flutter clean
flutter pub cache repair
flutter run
Upvotes: 2
Reputation: 109
For me, I had the app already installed on the device. Once I deleted it, and then tried to install via adb
again, it worked!
Upvotes: 0
Reputation: 1695
I know two reasons that lead to this error :
Or
Upvotes: 82
Reputation: 4445
It usually happens with Emulator. Easiest way is to go Andorid Studio > ADB devices. Click on the dropdown arrow on the right side of the emulator name and choose Wipe data.
Upvotes: 2
Reputation: 1159
This problem is mainly due insufficient space because over the time your device collects many logs and cache many stuff.
Try following solutions and one of them could resolve your problem.
Solution 1
Run flutter clean
and flutter pub get
.
Solution 2
Try removing some apps or disable some services from your device/emulator. As last resort you can simply create new emulator with more space and memory.
Solution 3
Make sure your package name is correct and you are following conventions as per Dart/Flutter.
Upvotes: 2
Reputation: 6752
I resolved these issues using these steps .I am using BlueStack Emulator for running Emulator.
Steps:-
I resolved these issues using these steps.
Upvotes: 1
Reputation: 450
This error will appear when your device hasn't enough storage for installing the application if you work with Flutter, the android studio doesn't tell the exact problem.
Upvotes: 11
Reputation: 438
To debug this, on Android Studio, open the Logcat tab. You will get a ton of messages, but somewhere in there will be the answer.
For example, if the package name is invalid, you will see:
W/ActivityManager: Invalid packageName: your.bad.package.name
Try using the search field in the upper right of the logcat window to filter the messages.
Also, you need to make sure that the device you are working with is selected in the target dropdown at the top of the window. Often, if you get this error, Android Studio will automatically remove your device from the target list and switch it to a different device. You might have to unplug and plug back in your USB cable to get it to appear again. Then select it, and open the Logcat tab at the bottom. The messages from the previous session will be saved and you can look through them.
Upvotes: 0
Reputation: 191
If you have previously installed apps on your Android Emulator,
Try uninstalling some already installed apps from the Android Emulator by going to...
Settings >> Apps & notifications >> app_to_be_uninstalled >> Uninstall
It worked for me :)
Upvotes: 0
Reputation: 1869
for my phone (not emulator) i disabled Verify apps over USB
from developer options
from my phone settings and it works.
Upvotes: 22
Reputation: 1101
Google service scans apk and consider it harmful and block from installation
Disable/ turn off the google service app scan. in your emulator
Upvotes: 0
Reputation: 179
Allow 'installing apps from usb' on your phone if you get this error on physical device
Upvotes: 16
Reputation: 2303
For me, everything worked after I deleted the build
directory inside my flutter project.
The build should have the app.apk binary file.
Upvotes: 11