Domain name won't resolve to an IP address.

by Mike Turek » Tue, 28 Sep 2010 06:23:31 GMT


Sponsored Links
 Hello Android Developers,

I am working on a program that will connect to a time server (time-
a.nist.gov), retrieve the timestamp, and place it in a text field.

However, when I create the socket, I get an UnknownHost Exception for
time-a.nist.gov


Some ideas I've gotten to fix it:

1. put the <uses-permission
android:name="android.permission.INTERNET" /> tag right before the </
manifest> tag. I did this, and the change is still there.

2. use the static InetAddress.getByName() function to convert to an IP
address (this still throws the same exception)

When I pass the IP address (129.6.15.28) to the socket constructor,
the program works fine. It only breaks when I use the actual domain
name.

Another note. I have written this program in Java and it works
perfectly fine.

If anyone has any ideas, I'd love to hear them! Thank you!

--



Domain name won't resolve to an IP address.

by { Devdroid } » Tue, 28 Sep 2010 19:27:22 GMT


 > If anyone has any ideas, I'd love to hear them! Thank you!

You could be using DNS which simply malfunction (or your device
got no DNS specified at all - worth checking). Try using other DNS,
or, if you got any domain of your own, delegate something like,

either:

time.mydomain. IN CNAME time-a.nist.gov.

or

time.mydomain IN A 129.6.15.28

and us that domain. However, if the culprit is DNS, it sill may
not solve your problem. Checking how queriers are resolved
(i.e. by using dig tool) could move you forward.

--


Sponsored Links


Other Threads

1. Reg:Camera porting

Hi Android ,
    Has anyone worked on the camera porting with android support.

Thansks and regards
Alok

--~--~---------~--~----~------------~-------~--~----~

2. Issue with Eclipse Android Plugin on Ubuntu Linux

I am running Ubuntu Linux (Jaunty) JDK 6.0 and am getting a strange
error for my first app.  i created the project and set the SDK home.
And also the JAVA_HOME is set.  But I can't run the app.

Your Project Contains error(s) please fix them before running your
application.

The only thing I see on the console logs are the following:

[2009-05-02 06:57:28 - HelloWorld] ------------------------------
[2009-05-02 06:57:28 - HelloWorld] Android Launch!
[2009-05-02 06:57:28 - HelloWorld] adb is running normally.
[2009-05-02 06:57:28 - HelloWorld] Performing com.test.HelloWorld
activity launch
[2009-05-02 06:57:28 - HelloWorld] Failed to find an AVD compatible
with target 'Android 1.5'. Launch aborted.
[2009-05-02 06:58:42 - HelloWorld] no classfiles specified
[2009-05-02 06:58:42 - HelloWorld] Conversion to Dalvik format failed
with error 1

--------------

When I click Run as Android Application, I get the following error.

--~--~---------~--~----~------------~-------~--~----~

3. You tube video error

4. How to port AbsoluteLayout to FrameLayout?

5. Eclipse and Mac OS X 10.5

6. Accessibility of the visual UI

7. Maps Intent in CupCake