views:

72

answers:

2

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

+2  A: 

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.

Macarse
A: 

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.

Exile