Phone restart [Android - App Installation] - android

I've met an issue related with almost every phone but not Nexus.
During installation of app to phone by usb - Android Studio - phone restarts itself and app is not installing finally - I have to run app one more time by Android Studio to install it.
This doesn't happen all the time, but randomly, it's annoying and time wasting.
Honestly I don't know with what it's truly related problem, phones or Android Studio.
Have you met this problem?
Do you know any solutions?
Thanks.

There are three cases:
There is a problem in the app source code: You should Build APK and install it in the phone. Maybe its required to install the app for several times. if phone restarted again, check the source code carefully.
There is a problem in usb cable: Maybe there is a short circuit in the cable or a glitch in it. Change cable and try again.
There is a problem in android studio: uninstall android studio and try to install it again.

Related

Android Studio emulator closes immediately after opening

When I start an emulator from Android studio, it closes immediately and it shows these messages in the Android studio event log
Previously, I had Genymotion installed, but the problem still occurs after I have successfully removed it (along with Virtual Box) from my computer.
I have VMware on my computer, but this was never a problem for successfully running an Android Emulator.
I have tried all of the proposed solutions on the internet (including reinstall of Android studio, update HAXM...), but nothing works.
Maybe it is due to the fact that your pc doesn't have much memory or disk space to run android emulator.Please check this if it helps.
Check what 'adb devices' shows you.
Seems like you still have some parallel instance running
May be it depends on your computer features.After you open a place where android studio is set up,everything might be okey

Android Studio: Running application in emulator not working

Today I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application but weren't able to run it. With adb I can install it without having any problems.
However, if I try to do it with Android Studio, it gets stuck on 'Installing APKs'. The same happens when I try to start it in an emulator (gets stuck on 'Waiting for target device to come online').
My device is a Samsung Galaxy S3 with LineageOS (Android 7.1.2) and root permissions. Android Studio recognizes my phone properly.
What I've already done:
installed openjdk
set android_home
installed all the SDK-platforms since Android 4.3 and Android Emulator from SDK tools
enabled USB-debugging
tried with MTP and PTP
tried another emulated phone
installed lib32stdc++6
restarted my computer
and probably much more
I tried to do it the whole evening and couldn't find a solution. Is there something Debian-specific because I can only find instructions for Ubuntu? I have never experienced anything close to this on other systems.
Thank you in advance.
EDIT: I am now able to use my phone to run the android application by using USB 2.0 instead of USB 3.0! Is that a normal behavior since it works with native adb? I mean, if I buy a new PC after some years which has got only USB 3.0 ports, will I not be able to use phone debugging with Android Studio or is this just an issue? It is still known since 2014 (https://stackoverflow.com/a/9548311/8292104).
However, I still cannot get the app running on an AVD. I changed graphics to software, now it shows the phone but the screen remains black and the phone won't start. What can I do to fix it?
Try to completely delete and install Android Studio again, I think that it will solve the problem
Another possible solution that worked for me is to, in the application, go to
app - build - intermediates - split-apk - debug - slices
and then delete all of the contents within this folder. Then again, this only worked for me, so I would duplicate the document in case of corruption.

Android studio: Error while installing apk

When I launch my virtual device ,it launches but my app doesn't show in AVD.
I update all the plugins and platforms required..after some time android studio given this error as following : Error while installing apk.
Please, solve my problem why this is happening, I'm suffering from 2 days.:(
Make sure your emulator up and running.
Also you can try running it on to your phone the process is simple,
Go to android setting=>About=>Click on build varian 7 times to become developer.
2.go to developer section and enable the debugging mode.
3.now if you are on window pc you have to download google usb driver and for MAC you can directly connect and you are good to go.
Make sure that you should uninstall all the applications that were developed by you in the emulator. After uninstalling all the applications that were build by you in the emulator, then clean project, run it again.Let me know if this works out.
Have you tried increasing the adb connection time out on the AVD?
To test this, first launch the avd and make sure it is turned on and running. Then try to build your application and install the .apk onto the device.

Many "Emulator unknown emulator - xxxx [null]"s are redundantly shown in android studio

this is more of a benign bug in android studio. Whenever I wake my computer from sleep or hibernate the connection between the emulator and android studio is not proper and I have to restart the emulator and try again, so as a result of that (I think) all the dead emulators are always shown in the listing when trying to run the app.
And FYI I don't usually restart/shutdown my computer (once in 10 days or so). I was just wondering if there was a way to fix this bug without having to restart the computer.
Screenshot of problem
Thanks in advance!
I am having the same issue using Windows 10 hibernate.
Try terminating the adb.exe process in the task manager. Sometimes you will find two or more adb.exe processes, kill them all. Then close all running emulators (if any) and disconnect all physical devices.
You don't have to restart android studio or eclipse.
After dong this, all unknown/null emulators should be gone (at least in my case).
Did you open multiple android studio and use the terminal in android studio?
you can close all android studio, and restart them. the unknown emulator will be gone

Crash on sleep after running eclipse with ADT plugin installed

I've been having issues for a while where my Windows 7 machine would blue-screen when I tried to put it to sleep. I ignored the issue and just avoided using sleep until I recently happened to figure out that the crash occurred only after I'd run Eclipse. By comparing with a fresh install and adding plugins individually, I was able to source the problem to the Android Development Tools plugin for Eclipse. If I run a fresh version of Eclipse with the Android plugin installed, then the next time I tell the machine to sleep it shows a blue screen instead. If I specifically remove the com.android.ide.eclipse.ddms_22.6.2.v201403212031-1085508.jar from the plugins directory, then the crash does not occur, although I of course lose the functionality of the plugin.
Now I'm at a loss. I can tell whats causing the problem but I have no idea how I can fix it if I want to continue to use the Android plugins in Eclipse. Does anyone have any advice on how to further troubleshoot this?
Edit: After reinstalling drivers, the crash appears to occur under the following specific condition: The old Motorola Droid II that I use as a backup testing device has USB drivers installed and is plugged in, and adb.exe is running (either while eclipse is running or after it has closed). Knowing that, I have the easy workarounds of unplugging the device or stopping the adb.exe process before putting the computer to sleep. Still no idea why there's a crash under those conditions, though.
Edit2: Since this hasn't been touched in a while, worth noting that it's an adb issue and not an eclipse issue (it occurs using Android Studio as well), so I've updated tags accordingly.

Categories

Resources