Debugging problem with the Android SDK on Eclipse - linux

I'm trying to open my debugger for an Android project. The emulator opens fine, but the debugger is hanging and thus never fully loads. I keep getting this message, that never goes away:
"Attempting to connect debugger to 'com.example.android.myApp' on port 8616" (The connection never completes).
I am using Linux Ubuntu 10.10.
Thank you all for your help. :)
Matt

set the following flad in your AndroidManifest.xml in the tag application
android:debuggable="true"
Note following Article: Eclipse Android: Could not open Selected VM debug port (8700)
This aswell: Could not open Selected VM debug port (8700)

Related

Getting a "404 Not Found" when I attempt to "Run Debug Application" of React app in PhpStorm

As title says, I'm trying to debug my my React app.
"Run Debug Application" and "Debug Debug Application". Both open up a Chrome window, and it displays the 404.
I am running Manjaro Linux.
This has been troublesome. Please accept my apologies; I don't know my way around PhpStorm, so let me know if I've left any information out.
EDIT: I checked the network ports and saw that PhpStorm was already listening on 3000 before I even clicked debug. I cannot run npm start for the same reason now.
Killing the process and restarting PhpStorm did nothing, the ports are still being listened on.
Thanking you for your time
EDIT: Changing the port number to which the debugger listens had no effect.
EDIT: Included commands used to start application.

Visual Studio 2017 Remote Debugging is not working

I want to use the remote debugger for VS2017.
But every time I started it on my VS machine I got the following error message:
"Could not launch debugger. Check the Debug settings.."
Do you have any hint, where can I get more information about the problem, like remote debgger not started, Proxy problem, settings... ?
Or how I can fix it ?
I setup the remote debugging connection for VS2017 on two Windows 10 machines.
On the remote debugging machine I started the tool by execution of msvmon.exe (by sharing the folder location on the machine, on which VS2017 is running).
It seems to run without any error, since a window was open with displays the machine name and the Port.
I copied then this information in the Remote Server Name field for the Visual studio debugger. I tried it with and without port number).
I also copied the debugger application to the same folder of the remote debugging machine, as it is on the VS machine.
After that I started the Remote Debugging session and the error message is shown.
Thank you very much!!
I could solve the issue. The problem was that the remote command parameter was not set. :-(

Android Studio: Unable to open connection to: localhost/127.0.0.7:5037, due to: java.net.ConnectException: Connection refused

I'm taking the first steps in android development. Started working through this guide https://developer.android.com/training/basics/firstapp/running-app and the error occurred when the program is run on the device.
First of all, my device is not in the list of connected in Android Studio:
adb devices doesnt see my device when Android Studio is running, but if I close Android Studio, adb devices shows my device
When Android Studio starts, it shows an error and logs all the time this error flashes:
I tryed this this solution but it didnt solve my problem:
I dont know, why Android Studio try to connect to weird address localhost/127.0.0.7:5037?
I forgot. I edited /etc/hosts and commented line
#127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
After uncommented the line and restarted the Android Studio, I've solved my problem.
in my case in /etc/hosts I had the following line that i removed
0.0.0.0 localhost
I've catched this error under:
Android Studio 3.1.4
Android Debug Bridge version 1.0.32, Revision eac51f2bb6a8-android
Also i'm working in the office with some active firewall, antiviruses, monitoring etc.
My local host in the "/etc/hosts" was commented.
I solved this issue, but it was only an adb connection problem.
First, you have to enable all features in a device's developer menu
(debug with USB, upload via USB, usb connection type - charge only),
security menu (allow unknown sources);
Second, you have to set an allowance on the device to accept commands
from a current PC. Some devices do not show a dialog. To force this,
open a terminal console in the Android Studio, type in a command
"adb logcat" (this push adb to connect with current device), you
should see a dialog on the device's screen. Choose "Allow". To exit
from logcat command, press ctrl+x/ctrl+c or ctrl+break;
After this, you should see the device in the Studio's logcat drop box as [disconnected];
Open the consloe again and type "adb wait-for-device", this should set a stable connection with device.
It helped me.
I had a similar issue with Android Studio 3.3.1 (MacOS) when I run my app, it could not detect any devices in the Select Deployment Target dialog window after initializing adb. It produced the following error:
Unable to open connection to: localhost/10.0.2.2:5037, due to: java.net.ConnectException: Connection refused
I checked in /etc/hosts, and found the following line:
10.0.2.2 localhost
Commenting out that line solved the issue.
In windows 10 I to need add path of ADB directory to environment PATH. And It helps.
The problem can be due to the fact that it is missing the adb driver for the specific phone, as you can verify from the device manager.
You have to donwload and install it from the manufacturer, if it is available.
In my case, this seems to be still an open issue, but I've finally found the correct driver and installed it, as suggested in the developer documentation, by following the appropriate links (in my case I landed in a xiaomi Chinese page, containing the link to the rar archive of the working driver).
Having done that first, I could finally see an unauthorized device from adb devices (before that, no device was found instead, since it was unrecognized at the operating system level in the device manager) and, eventually, the suggestion from Sergio, typing adb logcat in the terminal, finally prompted the authorization from the device.
Issue solved!
Check if the port is binded to any other connection in your computer. This may be the error which is caused de to ports inavailability.
This Error ConnectException is caused due to SocketException so i will start digging with the port's status.

Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'

I am running Android Studio on Windows 10 64 bit. I upgraded to the latest build and SDK the morning of 5/20, and since then I get the above error when opening Android Studio. I also get the 'Unable to obtain result of 'adb version' in the event log. If I launch the application (which worked fine before the update) the 'Select Deployment Target' window appears, showing 'Initializing ADB' with a loading graphic for a few seconds, which then results in a 'Nothing to show' message. Previously I had 4 different emulators set up, and an active device connect via USB. Now ... nothing.
Creating a new emulator has no effect - I go through the steps and still see the 'Nothing to show' message.
I have tried the following:
Reverting to older platform tools
Removing and re-installing the latest platform tools
Removing and re-installing Android Studio completely
Installed Genymotion to try emulate through that (I can create and start the emulator in Genymotion, it makes no different to the above issue in AS)
killed adb.exe through Task Manager, then ran adb tcpip 5555 through the terminal, the output was:
daemon not running. starting it now on port 5037 *
daemon started successfully *
restarting in TCP mode port: 5555
Which was encouraging, but the same issue described above persists (even after a restart of AS).
Switch to USB mode and back to TCPIP through adb in the terminal, no luck.
Migrated the entire project to Eclipse until I ran into support issues with Google Play Services (so I'm going to have to stick to AS, but I am getting desperate here)
Anyone that can assist - I would greatly appreciate it.
UPDATE - 5/23
I did a search for adb.log and found it in a temp folder on a completely different drive to the one that contains AS or my project files. Closed everything down, killed adb.exe through the task manager and deleted the file. Upon relaunching AS I received the following message:
screenshot of message
I could start/kill ADB through the terminal. adb devices resulted in an empty list. My idea.log file is filled with entries as from the date my trouble started. Restarting AS again resulted in the usual 'Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'' message.
Here is the last entry in my idea.log file:
2016-05-23 10:13:19,081 [ 824808] INFO - tools.idea.ddms.adb.AdbService - Initializing adb using: E:\Users\JakeSabre\AppData\Local\Android\sdk\platform-tools\adb.exe, client support = false
2016-05-23 10:13:24,082 [ 829809] WARN - #com.android.ddmlib - Unable to obtain result of 'adb version'
2016-05-23 10:13:24,083 [ 829810] INFO - ditor.DeployTargetPickerDialog - Unable to obtain debug bridge
java.lang.RuntimeException: Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'
at com.android.tools.idea.ddms.adb.AdbService$1.run(AdbService.java:236)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:366)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
The really weird part is that I actually managed to get something working yesterday - but I don't know how. I started AS and received the same error, but then started Eclipse (Mars 2) and launched the Android Device Manager through Eclipse. As soon as I did I could launch my app through the AS emulator! I closed it all down and tried again, just to be sure and it worked again.
This morning I tried the same trick, but was told my SDK is missing. I checked and platform-tools was indeed missing (not sure why). So I installed it again, got the usual error, and now my trick with Eclipse is no longer working. I feel like I am in the Twilight Zone here.
The solution is very simple. Open 'Command Prompt' as 'Administrator', run adb kill-server, then adb start-server. It worked for me.
I probably should have done this as part of my initial troubleshooting, but I ended up disabling Windows Firewall and my anti-virus (Trend Micro). The firewall did nothing, but disabling Trend Micro completely solved the issue....
Somehow, for some reason, Trend Micro decided to start not liking the daemon being created by ADB. 4 days of tears and frustration over such a small thing. Hopefully this helps someone else one day avoid it.
Geez, I can't it's the TrendMicro antivirus !! ... many Thanks !
This also works for me on my 64bit Win 10, took me a day to reinstall AS and ADK and trying to figure out why ... adb kill-server, then try disable/enable Antivirus and you'll see the difference.
For finer-grain of control, add the bin\studio64.exe of AS into the Exception List of Trendmicro Antivirus and it'll bring up adb just fine.
I got this fix by following this link:
https://stackoverflow.com/a/38447003/5521389
going into GenyMotion settings -> ADB tab,
instead of Use Genymotion Android tools (default), I chose Use custom Android SDK Tools and then browsed to my installed SDK.
From the information you've provided, I'm not sure that what I'm about to type applies to your situation. But since no one else has answered, you might want to consider it.
I had a very strange situation in which I kept getting the 'Nothing to show' message even though I had defined multiple emulated types of Android equipment, and also had a physical Android device.
I tried all sorts of things to solve the problem without success. Then I eventually tracked down an adb.log file that had been created in a directory outside any of the usual directory trees managed by the Android tools; a directory that is usually used for temporary storage. The access permissions on the file had somehow been changed so that one of the programs involved in debugging, could no longer access the file, and so failed to start properly. Removing the file solved the problem. The next time I attempted to begin debugging, everything worked as it should.
Although I was working with Linux, if the Android tools work in a similar manner with Microsoft Windows, the file might be in a directory tree identified by an environment variable, either TMP or TEMP.
Just update your platform tools from the SDK manager and restart your editor
In the Task Manager, delete adb.exe
In terminal, run command adb start-server

MonoTouch's Soft Debugger don't connect to App on iPhone - why?

I'm quite new on MonoTouch, so please forgive me my question in doubt... ;-)
I need help with the soft-debugger, because it's not connecting to the App on the device. While with iPhone Simulator everything is working as expected, the following happens when I start debugging against my device:
The is uploaded and installed to the device.
MonoDevelop comes up with a window saying the following: "Waiting for debugger to connect on 127.0.0.1:10000..." Please start the application on the device"
When starting the app on the device, the device vibrates indicating that the debugger is not connected....
In the settings of my App on the iPhone I have set the IP-Adress to my Mac's IP.
My iPhone is connected via WIFI to my network. I can ping my Mac from my iPhone and vice versa.
In several screenshots where the debugger was obviously working I saw that the debugger came up with the Mac's IP address and not the 127.0.0.1....
Do I have to configure my IP-address somewhere in MonoDevelop?
BTW: I'm using the latest version of MonoDevelop - it's 2.4.1
I have tried anything.... re-installing MonoDevelop, cleaning up the project several times, setting up a new project.... nothing...
Please, please help....
1.- Make sure you are connected the same wifi network both on device and computer
2.- Open monodevelop and your project and on top of the window select on the combobox "Debug|iPhone" (ScreenShot) setting and then clic on Run(menu)->Run Option (wait until it finishes to load your app on the device and DO NOT Open it yet)
3.- Get the ip address of your computer
4.- On the iDevice make sure that the application its closed then go to Settings -> (YourAppName) here you will be with the debug settings
5.- On Debugger Host setting you must put you computers ip address
6.- on MonoDevelop under Run(menu)->Debug you will be presented with the "Waitting for Debugger"
7.- Open you application and debbuger should connect now
Hope this helps
Alex
Alex,
many thanks for your replies! They were very helpful to me (especially point 5).
I have solved the problem by setting the Host IP in the ~/.config/MonoDevelop/MonoDevelopProperties.xml. That did it! :-)
Now I'm wondering where I do this setting in the MonoDevelop GUI... ;-)
Cheers,
Andreas

Resources