Android Hello Map View problems on the emulator

I am trying to run an Android Hello Map View application for an Android emulator. The Google Map view appears, but the tiles are empty.

Judging by the errors below (taken from LogCat), the application cannot connect to the Internet. The web browser on the emulator is connected without problems. I also double-checked the API key.

I am using the 1.5 Google API SDK from Eclipse Galileo on Windows XP SP3 behind a corporate firewall.

I tried two methods for adding proxy information:

  • Add -http-proxy http://www.foo.co.uk:80 to additional emulator command line options on the landing page in debug configurations.

  • Delete the settings in 1. and add the proxy information in Home> Menu> Settings> Wireless Controls> Mobile Networks> Access Point Names.

Nothing helps.

Any other ideas? Should I add proxy information in the application? If so, how?

Sam Dutton


AMENDMENT: Internet permission added to manifest element of manifest:

<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: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
+3
source share
4 answers

Did the same thing, moved "over"


<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>

+4
source

??

, :)

+1

for me, I put the permission in the wrong place in the manifest file. It should not be in the node application, instead it should be at the same level as the node application ..

+1
source

Source: https://habr.com/ru/post/1726470/


All Articles