Upgraded to SDK 2.3 - now no emulators have connectivity
Asked Answered
H

5

25

I've upgraded from 2.2 to 2.3. I originally thought that I had just a problem with my own Google maps application not working and posted a question link text

I now realise that the problem is much wider, in that non of the built in applications present when a new AVD is created will work. For example the 'maps' application gives "Network failure - This application requires a working data connection". The browser won't connect to Google or anything else. This happens with the AVDs that existed before I upgraded and with those created from the command line after the upgrade, for all API levels. I have all the necessary components I think:alt text

I've tried to describe this problem in it's simplest terms by decoupling it from any reference to Eclipse and to applications that I have written. The logcat for a newly created AVD set to filter out all but errors is very long but I'm posting those that I think might be relevant:

12-07 12:05:42.048: ERROR/System(61): Failure starting core service
12-07 12:05:42.048: ERROR/System(61): java.lang.SecurityException
12-07 12:05:42.048: ERROR/System(61):     at android.os.BinderProxy.transact(Native Method)
12-07 12:05:42.048: ERROR/System(61):     at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
12-07 12:05:42.048: ERROR/System(61):     at android.os.ServiceManager.addService(ServiceManager.java:72)
12-07 12:05:42.048: ERROR/System(61):     at com.android.server.ServerThread.run(SystemServer.java:206)
12-07 12:07:22.553: ERROR/CheckinTask(382): Checkin failed: https://android.clients.google.com/checkin (request #0)
12-07 12:07:22.553: ERROR/CheckinTask(382): java.net.UnknownHostException: android.clients.google.com
12-07 12:07:22.553: ERROR/CheckinTask(382):     at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at java.net.InetAddress.getAllByName(InetAddress.java:256)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-07 12:07:22.553: ERROR/CheckinTask(382):     at java.lang.Thread.run(Thread.java:1019)
12-07 12:08:43.802: ERROR/CheckinTask(382): Checkin failed: https://android.clients.google.com/checkin (request #0)
12-07 12:08:43.802: ERROR/CheckinTask(382): java.net.UnknownHostException: android.clients.google.com
12-07 12:08:43.802: ERROR/CheckinTask(382):     at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at java.net.InetAddress.getAllByName(InetAddress.java:256)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-07 12:08:43.802: ERROR/CheckinTask(382):     at java.lang.Thread.run(Thread.java:1019)
12-07 12:10:10.643: ERROR/CheckinTask(382): Checkin failed: https://android.clients.google.com/checkin (request #0)
12-07 12:10:10.643: ERROR/CheckinTask(382): java.net.UnknownHostException: android.clients.google.com
12-07 12:10:10.643: ERROR/CheckinTask(382):     at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at java.net.InetAddress.getAllByName(InetAddress.java:256)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-07 12:10:10.643: ERROR/CheckinTask(382):     at java.lang.Thread.run(Thread.java:1019)
12-07 12:11:41.652: ERROR/CheckinTask(382): Checkin failed: https://android.clients.google.com/checkin (request #0)
12-07 12:11:41.652: ERROR/CheckinTask(382): java.net.UnknownHostException: android.clients.google.com
12-07 12:11:41.652: ERROR/CheckinTask(382):     at java.net.InetAddress.lookupHostByName(InetAddress.java:506)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:294)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at java.net.InetAddress.getAllByName(InetAddress.java:256)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:248)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.executeWithoutRewriting(GoogleHttpClient.java:203)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:245)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at com.google.android.common.http.GoogleHttpClient.execute(GoogleHttpClient.java:313)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinTask.sendRequest(CheckinTask.java:254)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinTask.doInBackground(CheckinTask.java:150)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:221)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at com.google.android.gsf.checkin.CheckinService$1.doInBackground(CheckinService.java:214)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-07 12:11:41.652: ERROR/CheckinTask(382):     at java.lang.Thread.run(Thread.java:1019)

I'm using Vista 64 bit, JDK and Eclipse are 32 bits (I have had no problems before following the SDK from 0.0 right up to 2.2). I noticed in another post that it's necessary to add ...platform-tools to the PATH. I couldn't find any reference to this in the release notes, but I did it anyway.

I'm totally stuck now. Please can anyone suggest what the problem might be?

UPDATE 1540 GMT

Turned off Norton Internet Security Deleted the sdk folder, installed the starter pack and all the API levels.

Deleted c:\users\nick.android (Got rid of all the AVDS)

Recreated one AVD (Level 9 with Google maps)from the SDK Manager and started it.

Net result - just the same errors, browser won't connect, nor will the built in maps application.

UPDATE 1920 GMT

I had an older SDK saved to a memory stick. I copied this to a temp directory

alt text

I didn't change PATH, but clicked on the SDK Manager in this temp folder and started up an existing API level 7 AVD. The browser and the built in maps application both worked fine.

Filed bug report link text

UPDATE 9th December 1325 GMT

I managed to roll back to SDK 2.1 and found an old ADT plugin (0.9.9). I've got Eclipse 3.5 set up to use SDK 2.1 and Eclipse 3.6 to use SDK 2.3. (I know 3.6 isn't recommended but it used to work OK with SDK 2.1 although code completion was slow). SDK 2.3 emulators are still failing to connect.

If you are thinking of investigating this problem, please backup your earlier SDK and plugin, else you might end up with a useless development environment.

A brand newly created AVD in 2.3 gives:

12-09 13:09:08.823: ERROR/ActivityThread(213): Failed to find provider info for com.google.settings

12-09 13:09:30.193: ERROR/browser(213): onReceivedError -2 http://www.google.com/m?client=ms-android-google&source=android-home The URL could not be found.

when you start the browser

Hanker answered 7/12, 2010 at 12:26 Comment(11)
Do you still have the same problem? Have you found a solution to this? Because I'm on Windows XP SP3, and having the same problem. None of my AVD can connect to internet.Kulseth
Still got the problem. It's driving me nuts. I've been trying to fix it for hours. I never had any problems upgrading before.Hanker
@NickT: Your latest update is really shocking. You might consider filing an issue on the Android project issue trackerRepublicanize
Can you start up and adb shell and play with ping, netstat (and if android has it, ifconfig?) Also, make sure the emulated device doesn't think it's in airplane mode or something.Neuropathy
Not sure what all the available shell commands are but netstat gives: netstat Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN tcp 0 0 10.0.2.15:5555 10.0.2.2:57931 ESTABLISHEDHanker
ifconfig returns nothingHanker
I also had problems with the last update. I ended up with deleting it and reinstalled it. Now it works fine. So I suggest that you reinstall Android SDK 2.3 and ADT 8.0.0.Selfabasement
Filed bug report 13031 with Google.Hanker
NickT did you update androidtools via avd manager first in your update sequence?Shoeblack
@Fred - I just don't know. I let the SDK Manager do its thing and all the components arrived. I can't remember what order they came in.Hanker
@Jonas, tried this too, and didn't work for me.Kulseth
K
46

I found a temporary solution for people having this problem.

You can start your AVD in CMD prompt like this

Windows

C:\program files\android\android-sdk-windows\tools\emulator -avd <avdname> -dns-server 8.8.8.8

Mac cd ~/Library/Android/sdk/emulator ./emulator -avd <avdname> -dns-server 8.8.8.8

8.8.8.8 is google public DNS.

The problem seems to be that the emulator can't find the DNS your computer is currently using.

Kulseth answered 9/12, 2010 at 15:2 Comment(6)
This is looking like a winning work around so far!. The browser connects. don't know why SDK2.2 didn't object but well done!Hanker
@NickT, I tried adding this settings to the eclipse plugin, but it dosen't seem to work.Kulseth
It seems to work if you do it on a project by project basis in the run configurationsHanker
It doesn't seem to like systems that have 'obtain DNS automatically' set. I changed it to manual set to Norton's Public DNS and the emulator browser works staright offHanker
please anyone tell me how to how to do this, because this command doesn't works for meMauricemauricio
Is this a Bug now ? Do we really have to do it over command line ?Iodize
U
7

Solution is: change your DNS server (on the development machine) to fixed, e.g. 8.8.8.8

Unscramble answered 11/12, 2010 at 15:26 Comment(1)
@Tobias please mention or at least give some useful links for how to change the DNS serverNovella
D
3

In order to use internet on emulator if you are setting behind a proxy server perform the following steps:

Go to settings->Wireless & networks->mobile networks->Access Point Names. Press menu button. an option menu will appear.

from the option menu select New APN.

Click on Name. provide name to apn say My APN. Click on APN. Enter www.

After this check the internet Connection

Diphenyl answered 10/8, 2012 at 20:6 Comment(0)
B
0

For those who use bash CLI, try:

/C/Users/<your.user>/AppData/Local/Android/Sdk/emulator/emulator -avd Virtual_Machine -dns-server 8.8.8.8
Bast answered 7/7, 2021 at 17:37 Comment(0)
P
0

Solution ok for me :

1.Go to sdk path: cd C:\SDK\emulator (example)

2.Get the device: emulator -list-avds
ARMOR_X7_PRO_API_29 (example)

3.Set the dns: emulator -avd ARMOR_X7_PRO_API_29 -dns-server 8.8.8.8 (example)

Peroxidase answered 19/1, 2022 at 23:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.