Debugging not working in Android Studio - android

I am unable to debug my app in Android Studio. It always keep showing this message
Warning: debug info can be unavailable. Please close other application using ADB: Monitor, DDMS, Eclipse
Restart ADB integration and try again
Waiting for process: com.#######
I can't debug by any method neither run time nor launching app in debug mode.

Did you turn it on the Android side? The option is hidden behind a backdoor now.
Then Windows need driver, Linux does not need driver, same might be but I don't know goes to Mac OS X. Windows driver for Nexuses are already included.

This method that I'm writing it works for windows :
1-You need to get your device's drivers using the manufacturer's website. (ADB Drivers).This is a must for debugging and it seems that it is where your problem is lying beneath. If you use a simulator like Genymotion, skip this step.
2-Enable USB debugging from developer options.
3-Connect your device.

As the error message is displaying
Warning: debug info can be unavailable. Please close other application using ADB: Monitor, DDMS, Eclipse
You have Eclipse program running which is using the ADB Connection. So first close the Eclipse Program and Try Debugging in Android Studio, if problem persist then restart Android Studio or restart machine

Related

I have an error initializing ADB : Android debud bridge not found message on my mac . What should i do?

I am trying to connect my android phone to my android studio via my macbook but the android studio keeps displaying the “Error initializing ADB: Android Debug Bridge not found” message.
Please let me know on what i should do .
thanks
First go to File>Invalidate Caches and Restart.
After restart, in the terminal write the command adb devices. If you get the error, as you mentioned then that means you don't have adb installed. But as far as I have used Android Studio, you don't get this error in Linux and Mac.
Also if you are trying to connect to your physical phone, then you need to enable Developer Options, and then check enable USB Debugging.

In Android Studio, app is running on emulator but not in physical device

I am using Android studio 3.4.1, In which my projects are not running in real device. but not having any problem in emulator.
After connecting the usb and i have run the app. then getting this error. after that device is not even listed in the available devices.
error got in logs:
Installation did not succeed.
The application could not be installed.
Installation failed due to: 'device '711KPMZ0603459' not found'
Retry
Retry also not working.
I also tried in Android studio Beta 1 and Beta 3. same problem happening.
can any one help me in this?
FYKI:
1. USB debugging enabled.
Tried USB option for File Transfer, USB tethering, No data transfer.
Tried with different cable as well.
Problem identified only after updating 3.4.1 android studio. Also facing in 3.5 Beta 1 and Beta 3.
Same kind of problem already added in Issue Tracker. https://issuetracker.google.com/issues/122892907
Kill and Restart the adb manually through Terminal using below comments. use cd to go inside platform-tools under Android sdk folder.
./adb kill-server
./adb start-server
PS: Before posting this questing here, i already tried quitting the adb in Activity Monitor (which can be opened from spot light)
Activate USB-Debugging in Developer Options and set your USB options from Charge phone to transmit Data.
Well the mark of your phone is important because in my case i use LG G5 and i could not see my device even after turning on developer mode and enabling debugger options.
I don't know the type of phone you use but you can try my solution.
After turning on USB debugging, go to tethering under the networks sections and turn on USB tethering then try again.
Hope It helps!

Android Studio to Bluestacks Connection Error

I am new to android development and was trying to use bluestacks to test my apps (as my pc won't run the emulator fast) but the bluestacks emulator is not being detected by android studio.
I started bluestacks and then ran my app. On the choose device dialog it doesn't show bluestacks.
I looked up in device monitor, but bluestacks wasn't detected there.
I also tried using adb kill-server, adb start-server, adb connect 127.0.0.1
but that didn't work as well. It says "connection could not be made as the target machine actively refused it".
All the solutions given in the other related stackoverflow post don't work. Android studio won't recognize bluestacks.
Please Help !!
Try in command prompt "netstat -anb" with administration privileges. Check if there is 127.0.0.1 5555 Estebalished.
If everything is OK then temporary disable firewall and type"adb connect 127.0.0.1:5555" should work.
i too have also gotten the error "connection could not be made as the target machine actively refused it" recently (when i tried to connect to adb using command prompt)
Trying with -> adb connect localhost:5555 or adb connect 127.0.0.1:5555 would not work. You need to identify your bluestack device ip address. You can identify the ip address using the preferences in your bluestack emulator setting. (where you enabled ADB in bluestack).
I did the following to resolve the error you had encountered and successfully connect Android studio to Bluestack. please try the following steps. (I am using windows 10, Android Studio 4.0.1, Bluestacks 4.200.)
find your android studio sdk platform tool folder. For me its is
custom installed in my D drive. for example->
D:\AppData\Local\Android\Sdk\platform-tools
right click on adb.exe
and run as administrator. (click on yes if a pop up ask if you would
like to make changes to your devices. After that you would only see
another pop up that suddenly disappear.)
open Bluestacks. Run your selected emulator (samsung/pixel etc). Ensure that
you have enable "Enable Android Debug Bridge (ADB) in the emulator
preferences.
open command prompt. cd to your platform tools folder path.
enter the following command->adb connect xxxxxxxxxxx where xxxxxx is your
device localhost ip. (see attach pic. My device ip is
127.0.0.1:xxxxx hence my command is ->adb connect 127.0.0.1:xxxxx
continue with the following command->adb devices you would see your bluestack
emulator device. same ip listed.
open your android studio. You would be able to see your bluestack emulator
[
i don't know if you fixed the issue or not but it's pretty simple to use bluestacks, if you see this screen when you open it like this all you have to do is run the app in android. it happens where android doesn't detect it because it wont see it as a device you either wait or try to get that screen (that sort of refreshs)
Just Need to do this!
Go to the SDK folder that you have got in your computer,then open the "platform-tools" folder,then open the "adb.exe" as administrator.
then try the BlueStack emulator.
if u got problem to connect with blue stack through android studio then follow following steps
in run(windows+R) put '%localappdata%\Android\Sdk\platform-tools' and check adb.exe is working correctly or not
If not then download file from
https://www.microsoft.com/en-us/download/confirmation.aspx?id=49093 which is
Update for Windows 7 for x64-based Systems (KB2999226) (related OS)
and install it.
allow adb.exe as exception in your virus scan software don't treat this exe as malware.
start your blue stack emulator.
go in setting of blue stack emulator go in preferences click checkbox 'Enable Android Debug Bridge'.
go to this location %localappdata%\Android\Sdk\platform-tools and run cmd through this location.
put command 'adb connect localhost:5555' press enter in command prompt.
start android studio then run project through play button popup will come with virtual device list, it will show your emulator's device.
...happy coding

WARNING : No target specified, deploying to emulator

I'm trying to run an ionic app on my mobile phone (Android 4.4.2).
USB-Debugging is activated.
When i run the command "ionic emulate android" everything works fine and the app is opend in the emulator.
But when I run the commad "ionic run android" I get following warning:
WARNING : No target specified, deploying to emulator
and the app is started on the virtual device...
Shouldn't the app run on my mobile phone? What am I doing wrong?
How can I specify the target?
P.S.: When I copy the .apk file to the phone I can run the app.
I had another developer tool opened (Chrome Inspect) and it "ate" the connection. In my case, just closing the Chrome Inspect panel and running ionic run android worked.
I solved the problem.
Here is what I did:
I typed into the command line: adb devices (located in the "platform-tools" folder in the Android SDK) which returned me an empty list.
So I installed my phone's drivers, which I downloaded from the vendors homepage.
Now the list contains my device and the app is started on my mobile phone.
I had a different problem, with a very simple solution.
When plugging in your Android device for the first time, it'll ask you to trust the computer's certificate. That popup screen disappeared on me, as I was just getting a call.
Simply unplugging/replugging your phone and accepting your computer's certificate should do the trick!
Once you've enabled your device for debugging, make sure to turn on usb tethering on the device;
Settings > Tethering & Networks > USB tethering
This fixed the problem for me.
In my case I had Android 5.1.1, and below are the steps I took:
Please check that your PC recognizes your phone (you can access the files like in a USB flash drive). If not please install the drivers from google here.
Please check that the USB debugging options is checked on your phone, then:
1- Go to Setting -> General -> '{} Developer options'
2- Look for the 'USB debugging' option
3- If the 'USB debugging' option is disabled then turn off 'Developer options' and turn it back on. Now you should be able to check the 'USB debugging' option.
None of these worked for me on android 6.0 on a mac.
I found this article: http://trendblog.net/android-file-transfer-not-working/
quoting from it:
Enable Developer Mode by going to Settings > About Phone (at the very bottom usually) > press on Build Number repeatedly until the pop-up appears
Go to Settings > Developer Options
Enable USB debugging
I'm on a Mac.
What worked for me was to heed the warning on the device that said no program on the Mac was available that could connect to the device, such as Android File Transfer.
I installed that. Unplugged and replugged the USB cable. And voila.
I had two problems (Ubuntu OS):
I had a connection open with chrome//inspect - close that (simply close the tab)
I missed the dialog that appears when you connect your device through USB cable. You must trust the computer.
Now run the command cordova run android and look at your device there another dialog will be appeared click ok, now you are done! In the terminal you will see LAUNCH SUCCESS. By the way I removed the old app from my device too.
No target specified and no devices found, deploying to emulator
When this message appears, you have to click START, and activate your emulator before.
If your app is already installed in your device and your device debuging is already enabled.
Then uninstall the previous app and install the fresh apk
sudo ionic cordova run android
Once you are remove the USB plugin from the computer means it will not work. Already open the Chrome inspect in your PC means close that tab and run.
In my case, just closing the Chrome Inspect panel and running ionic cordova run android worked.
Thats all. Enjoy your coding
I got the solution by removing the Android emulator and re-create the emulator from AVD Manager of Android Studio.

emulator constantly running in the background

whenever i start eclipse or android studio an emulator is constantly running in the background. when i try to turn it off it restarts again immediately. no matter if i work with a real device or an emulator i have created, this other emulator is not stoppable. in the android debug monitor this emulator is listed as emulator-5554 - Online - ? [2,3,4, debug] (Version API10). i never created or used this emulator, and there is no place to find and delete it.
actually i am able to work with eclipse or android studio with that annoying emulator, but it seems to slow down the performance and i would like to get ride of it.
Were you using BlueStacks back then by any chance?
It uses the port 5554, and that might have been your problem too!
It happened to me as well and found the solution in another question:
Eclipse Android Emulator-5554 is always displayed
Strange, but should be able to kill a "hidden" emulator instance from the command-line by connecting to its console, i.e.:
telnet localhost 5554
kill
Replace 5554 with your emulator instance's number.
I use AndroVM. For me its perfect.
Todo is:
install VirtualBox first
download AnroVM
file will open in VirtualBox
start the machine and set USB debug on (settings >> dev. options)
in commandprompt goto your "sdk\platform-tools" type adb connect 192.168.15.101
When it's ok you will see your device in Eclipse.
edit: When your Eclipse is not working well, just download a new bundle again

Categories

Resources