I recently updated my android studio to 3.4.2. Until that point, everything was working perfectly fine.
But after I updated and made a few changes in the code I ran the app but unfortunately, the app does not get installed on my device anymore, it stops as soon as the build is completed.
Things I tried doing to solve the issue:
1. Restart the android studio
2. run it several times
3. kill and start the ADB
Launching app
$ adb install-multiple -r -t F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_9.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_0.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_6.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_2.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_5.apk F:\achuth\khelo\app\build\intermediates\resources\instant-run\debug\resources-debug.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_3.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_4.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_7.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_1.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\slices\slice_8.apk F:\achuth\khelo\app\build\intermediates\split-apk\debug\dep\dependencies.apk F:\achuth\khelo\app\build\intermediates\instant-run-apk\debug\app-debug.apk
Device emulator-5554disconnected, monitoring stopped.
Split APKs installed in 32 s 703 ms
Close Android Studio and Delete the cache in /System/Caches is useful for system
Related
In Android Studio were it was supposed to show physical device list it keeps saying Loading Devices...I tried every possible answers I found online, killing ADB from task manager, reinstalling platform tool, reinstalling android studio, manually running ADB, starting ADB server manually, even starting android studio as admin. I removed anti-virus. But nothing is working.
Problem here is that when I run the adb devices it is able to detect my phone but android studio doesn't.
NOTE: I have my phone on in debug mode, with file transfer permission.
here is a screen shot of android studio, and the cmd
After installing i get a Disconnected emulator-5556 message, while im running a different emulator (on 5554).. Even when i don't have any emulators of devices running!
I tried deleting all my AVD's
Wiping AVD data
adb kill-server && adb start-server
AS restart
Created a new user profile on my Mac to see if that helped..
Re-installed SDK Platform tools
When i launch my app via run. The device selector shows this. Is this way since a long time and didnt interfere with my work in AS 3.2. But after upgrading to AS 3.3 i cant run apps anymore
But nothing works, anyone ran into this issue before?
For if someone runs into this in a couple of years. I tried a couple of commands and the ghost emulator magically disappeared...
First command (to see if a process is doing something with adb)
ps aux | grep adb
Second command (to see if files are opened by a process)
lsof -nP -i4TCP: 5556 | grep LISTEN
Shouldn't have worked, but it stopped the blinking emulator for me..
No worries, just go to SDK manager and check if the Update is Available for the SDK Platforms, or SDK Tools. this usually happens when we use previous versions and sudden date to the new version of android studio and tools or platforms are not ready or updated with that version. Android has the version compatibility issues.image
I had the same issue after upgrading to Android Studio 3.3. In my case I had the Videostream app on my Mac and it was competing for port 5556. Uninstalling /Applications/Videostream and killing the process freed up port 5556 and everything started working for me again.
I've recently started encountering problems while trying to run my application from Android Studio on my MacOS machine. I tried to run the command from adb myself but I still can't get it to work, although the error appears different.
The errors I get are as follows;
Android Studio
10/02 09:54:53: Launching app $ adb push /Users/{username}/{path-to-apk}.apk /data/local/tmp/{package}
java.io.IOException: Broken pipe
Error while Installing APK
adb (via Terminal.app)
$ adb push /Users/{username}/{path-to-apk}.apk /data/local/tmp/{package}
adb: error: 65536-byte write failed:
Undefined error: 0
Now I've tried a lot of different things, some of which are just stretches because the problem appears to lie in something adb related, but none of this seems to change anything;
Different applications/apks
Different Android devices (total of 5)
Different USB-ports (all 4,
with and without USB-hub).
Different (or no) USB-dongles (USB-C to USB-A)
Restart/Invalidate Caches (Android Studio)
Reinstall Android Studio
Reinstall Android SDK
New (separate) install of Android SDK through homebrew
Reset NVRAM/PRAM
Reset SCM
Update to MacOS Mojave (and retry all of the above).
At this point I am at a loss. Has anyone encountered these errors before without having any of the above solutions fix it? Next thing on my list is a reinstall of the OS, but that feels like a bit of overkill.
I am running on MacOS Mojave on a 2016 Macbook Pro, but everything appeared to have the same effect on High Sierra.
Edit
Weird update on the behaviour, I can get the installing to work continuously after a restart by doing the following steps;
Login
Start Terminal.app
Manually repeat adb push command
(Command executes successfully)
Start Android Studio
Everything works fine...
However, if I start Android Studio without first manually doing the adb push in Terminal, everything is broken as described above.
Edit 2
Even calling adb start-server in Terminal before starting Android Studio makes everything work. So something appears to be faulty when Android Studio is responsible for starting the adb server..
I got the same error. I have no idea but start-server before starting Android-studio
Restart adb with the following command,
adb kill-server && adb start-server
Not really an answer but my issue appears to be solved with the latest release of Android Studio.
I downloaded the examples from simpligility.github.io/android-maven-plugin and did a mvn clean package android:deploy on the helloflashlight example.
After setting adbConnectionTimeout to 15000 everything went fine for one run. I deployed the app sucessfully - the app started on my device and I was able to push the color buttons.
After that I ran mvn android:undeploy to clean the device. Now I am not able to deploy this test app again. Maven says FAILURE "E/Device: Error during Sync: Eine vorhandene Verbindung wurde vom Remotehost geschlossen" Which means an open connection was closed by remote host(?).
I googled and found out that the problem may be 2 processes of adb.exe starting during deploy. So I entered adb kill-server and shut the adb down.
Still on each deploy 2 adb.exe are starting, one is shutting down immediatly, the other stays open. Searching for adb.exe at my computer only finds one adb.exe.
Does anybody have some hints for me?
My system setup:
I installed Eclipse with current ADT (Android Deploment Tools).
I used the Android SDK Manager to download and install android sdk and tools into C:\users\me\android-sdk. I added a samsung device to the device list which is displayed when I enter adb devices
After that I configured Maven for android - setting ANDROID_HOME and added %ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools to my PATH.
I am working with Windows 7 64-bit.
It seemed to be a problem with the device. I switch to another device of same type... no problems any more.
I'm working on Phonegap for few days. Before this I was able to run phonegap apps into emulator through command line successfully, but now that's showing a peculiar hang; nothing happening no error, no flow of execution.
Now I'm running my apps by installing the .apk file directly through Android command line. But, still I want to know why it's not working, why this run command hangs there?
In my case ADB DEVICES displayed me invalid devices, an ADB KILL-SERVER solved this for me.
i suspect that is was caused by a my laptop going into sleep mode.
when it says trying to install app onto device the command is actually running adb install C:/yourpath/yourapp.apk which copies the app the android installation.
You shouldn't worry if it takes a long time. The installation is proceeding as planned, just be patient. The bigger your app, the longer is takes. For me a ~300MB app takes a full 7 mins to install to an attached device via USB. And the same app will take 13 mins to install to an Android emulator.
The emulator is known to be slow, there's a big SO thread regarding this issue here - Why is the Android emulator so slow? How can we speed up the Android emulator?