开发者

Android Hello Map View problems on the emulator

I'm trying to run the Android Hello Map View tutorial app on the Android emulator. The Google Map view displays, but the tiles are blank.

Judging by the errors below (taken from LogCat) the app is unable to connect to the internet. The web browser on the emulator connects without problems. I've also double-checked the API key.

I'm using the 1.5 Google APIs SDK, from Eclipse Galileo, on Windows XP SP3, behind a corporate firewall.

I've tried two methods to add proxy information:

  1. Add -http-proxy http://www.foo.co.uk:80 to Additional Emulator Command Line Options in the Target Page in Debug Configurations.

  2. Remove settings in 1. and add proxy information at Home > Menu > Settings > Wireless Controls > Mobile Networks > Access Point Names.

Neither seems to help.

Any other ideas? Should I be adding proxy information within the app? If so, how?

Sam Dutton


AMENDMENT: internet permission has been added to the manifest application element:

<uses-permission android:name="android.permission.INTERNET" />

12-23 16:43:31.624: INFO/System.out(717): waiting for debugger to settle...
12-23 16:43:31.828: INFO/System.out(717): debugger has settled (1480)
12-23 16开发者_JS百科:43:32.299: ERROR/ActivityThread(717): Failed to find provider info for com.google.settings
12-23 16:43:33.738: INFO/MapActivity(717): Handling network change notification:CONNECTED
12-23 16:43:33.738: ERROR/MapActivity(717): Couldn't get connection factory client
12-23 16:43:34.879: DEBUG/dalvikvm(717): GC freed 4012 objects / 232976 bytes in 97ms
12-23 16:43:37.818: INFO/ActivityManager(565): Displayed activity com.bbc.HelloMapView/.HelloMapView: 8939 ms
12-23 16:43:38.408: DEBUG/dalvikvm(717): GC freed 8198 objects / 604808 bytes in 90ms
12-23 16:43:38.888: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:40.488: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:42.097: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:43.307: DEBUG/dalvikvm(612): GC freed 4040 objects / 229536 bytes in 123ms
12-23 16:43:43.789: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:45.387: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:46.978: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:48.428: DEBUG/dalvikvm(656): GC freed 2771 objects / 170824 bytes in 234ms
12-23 16:43:48.708: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:50.298: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:51.898: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:53.277: DEBUG/dalvikvm(717): GC freed 5333 objects / 338584 bytes in 140ms
12-23 16:43:53.408: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:53.447: DEBUG/dalvikvm(636): GC freed 2913 objects / 165264 bytes in 244ms
12-23 16:43:56.527: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:43:58.329: DEBUG/dalvikvm(610): GC freed 3249 objects / 193992 bytes in 122ms
12-23 16:43:59.169: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException
12-23 16:44:02.518: INFO/InetAddress(717): Unknown host www.google.com, throwing UnknownHostException


Did the same thing, moved the "" above the "


<uses-permission android:name="android.permission.INTERNET" />

<application android:icon="@drawable/icon" android:label="@string/app_name">
 <uses-library android:name="com.google.android.maps" />

    <activity android:name=".HelloMapView"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>


are you setting the internet permission in the manifest file??

I am sure you must have just checking:)


Looks like this is a bug: Issue 3764: Google Maps fails via mandatory web proxy.


for me I put the permission in the wrong place in Manifest file. It shouldn't be within application node, instead it should be at the same level as application node..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜