Steven
Steven

Reputation: 4022

Accessing google maps in android emulator

i am developing an android application using google maps data.I can access google maps in emulator but when i try the same in my application the google maps is not opening .What is the problem?Help

Upvotes: 3

Views: 2435

Answers (2)

Exile
Exile

Reputation: 9603

Sounds like your not using the Google API in the emulator:

http://code.google.com/android/add-ons/google-apis/

You need to create an Android Virtual Device (AVD) with the google API: alt text

In the above screenshot you can see that 'test_avd' does not use the google API. Also you can see 'test_maps_avd' does use the google API.

Upvotes: 5

Macarse
Macarse

Reputation: 93153

First of all I would try doing this example.

Check that your manifest has:

<uses-library android:name="com.google.android.maps" />
<uses-permission android:name="android.permission.INTERNET" />

Also remember that your view should have something like this:

<com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:clickable="true"
        android:apiKey="Your Maps API Key"
    />

You can get your map key from here.

Upvotes: 3

Related Questions