Android new android application project logcat errors - android

I just creates a new android application using eclipse.When I run the project it shows following errors in logcat
11-04 19:19:50.928: W/WearableConn(1441): Error writing to device, error: failed to connect to /10.0.2.2 (port 5601):
connect failed: ETIMEDOUT (Connection timed out)
11-04 19:19:50.988: I/WearableConn(1441): Socket closed
11-04 19:19:51.018: I/WearableConn(1441): Waiting 4.0 seconds to retry connection
11-04 19:19:55.068: I/WearableConn(1441): Connecting via TCP to /10.0.2.2:5601
11-04 19:20:00.028: I/ProcessStatsService(1237): Prepared write state in 6ms
Since I dont understand this I am a beginner need help?

Dont use wearable API (Api 20 4.4W). always use Api 19 4.4. bcoz android wearable is a completely different platform. u have to make app compatible with wearable (u can use targetSDK or compile SDK to be 20) but not for the wearable.

Do like this.
Go to command prompt and type as netstat and check whether port 5601 is open. if it is,then open another command prompt and type the following command telnet localhost 5554
once connected
type
redir add tcp:5601:6000
and quit
Hope this helps..

Related

RuntimeError Message When Trying to Run App on Android Emulator

This is the error message i keep getting when i try to run app on emulator
RuntimeError: abort(Error: could not connect to TCP port 5554: cannot connect to 127.0.0.1:5554: No connection could be made because the target machine actively refused it. (10061)). Build with -s ASSERTIONS=1 for more info.
What are the best ways to tackle this?
I have tried running my android emulator to test what am building but instead it is showing me those error message

trying to connect expo app to bluestacks error No connection could be made because the target machine actively refused it

I'm working on a react native app with expo and i'm trying to use bluestacks as an android emulator, i have the bluestacks open and running and on my command line (git bash) i use
expo start --android
but i get the following error:
could not connect to TCP port 5554: cannot connect to 127.0.0.1:5554: No connection
could be made because the target machine actively refused it. (10061)
[14:28:35] Error: adb exited with non-zero code: 1
what could be causing this and how can i fix it?

Failed to debug Android app with physical device

After testing my Android app with Android studio on several devices with no problem, since a few days I get the following log in the console:
14:48 Unable to open connection to ADB server: java.io.IOException:
Can't find adb server on port 5037, IPv4 attempt: Connection refused:
connect, IPv6 attempt: Connection refused: connect
14:48 Failed to start monitoring 19134523021744
14:49 * daemon not running; starting now at tcp:5037
14:49 * daemon started successfully
14:49 * Failed to start monitoring 19134523021744
and it continues like this... starting the deamon thread and immediately after that it reports the errors above. In ther device list of Android Studio my physical devices continue to appear and disappear from the list.
It looks like the ADB is working intermittently and I'm not able to debug anymore. When I try to launch the app I get an error saying that "the device is offline", no matter which physical device I use. It works only with the emulator. I tried to restart the PC several times, checked the settings, to no avail. Any hint ?

Unable to open connection to: localhost/127.0.0.1:5037, due to: java.net.ConnectException: Connection refused: connect

My Android Studio 3.4.1 shows the error below (as in screenshot) when running the app
Unable to open connection to: localhost/127.0.0.1:5037, due to: java.net.ConnectException: Connection refused: connect
I have my android phone connected to my Windows 7 PC, but Android Studio still show the error. I did click on "Restart ADB server" but problem persists.
Thank you
Use 10.0.2.2 to access your actual machine.
When you use the emulator, localhost (127.0.0.1) refers to the device's own loopback service, not the one on your machine as you may expect.
You can use 10.0.2.2 to access your actual machine, it is an alias set up to help in development. You can read more from Here
Also, remember to access localhost from your real device your system and mobile need to connected to the same wifi/network.
I had the similar problem on Ubuntu: but I found out also that my phone keep reconnecting in IDE.
Solution - just to give permission change things to the android studio folder.

Unable to load application in Android Studio emulator

I can't open the application I'm developing in Android Studio emulator, It is showing the following message in the log
Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences.
Unable to open connection to: localhost/17.253.38.253:5037, due to: java.net.ConnectException: Operation timed out
Following is the port listening by adb
adb 14528 unnikrishnan.b 10u IPv4 0x7e537943f4599ac9 0t0 TCP localhost:5037 (LISTEN)
This happened after I upgraded to android studio 3.1.2. How I can fix this issue?
Thanks,
Unnikrishnan B.
can be caused by an ip address in the file etc / host, sometimes you enter an additional to make tests and it is not deleted, you must check that in your file this
127.0.0.1 localhost
255.255.255.255 broadcasthost
:: 1 localhost
you can also ping the address 127.0.0.1 to check for an answer, $ ping localhost
additional information that can helps you
https://issuetracker.google.com/issues/37126279

Categories

Resources