0

here is the XML file :

<com.google.android.maps.MapView
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
                 android:apiKey="0q7NUYm4bgzeXlqXtKYVPJDRWUJmt8Cu0gvbWMx"
                  android:id="@+id/map_view"
                 />

and Manifest file :

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
   <uses-library android:name="com.google.android.maps" />
    <activity
        android:label="@string/app_name"
        android:name=".MapsActivity" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

and in the JAVA file :

 public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mapView = (MapView) findViewById(R.id.map_view);      
        mapView.setBuiltInZoomControls(true);

    }
    @Override
    protected boolean isRouteDisplayed() {
        // TODO Auto-generated method stub
        return false;
    }

My problem is : Map is not displayed. I am facing a problem Android Emulator.

animuson
  • 53,861
  • 28
  • 137
  • 147
user1161960
  • 90
  • 1
  • 9
  • 1
    had generated your own Map key? – Mohammed Azharuddin Shaikh Mar 23 '12 at 06:48
  • Are you getting any exception then please post it. And make sure that the Key that you get for Map API is up to date. And one more thing the MapKey is different for different machines... – Prem Mar 23 '12 at 06:49
  • 1
    http://code.google.com/android/add-ons/google-apis/mapkey.html – Prem Mar 23 '12 at 06:50
  • Alternative for the above in easy steps....http://www.technotalkative.com/how-to-generate-google-maps-api-for-android-mapview-2/ – Prem Mar 23 '12 at 06:53
  • thanks for your responses Errors : Failed to find provider info for com.google.settings Couldn't get connection factory client – user1161960 Mar 23 '12 at 06:55
  • @user1161960, for that you please refer this link...http://stackoverflow.com/questions/2199403/couldnt-get-connection-factory-client – Prem Mar 23 '12 at 07:02
  • One more thing that i found is that you are trying to use built in zoom controls right. For that you need to set android:clickable="true" in the mapview in xml file. – Prem Mar 23 '12 at 07:05

2 Answers2

2

you change in manifest

<uses-sdk android:minSdkVersion="8" />

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


<application

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

</application>
Android
  • 1,417
  • 9
  • 11
0

Download the following APKs

com.android.vending-1.apk

com.google.android.gms-1.apk

Install these two APK into your running (target) emulator with ADB command:

adb -e install [path-to-APK-file]

Community
  • 1
  • 1
Aarun
  • 564
  • 1
  • 6
  • 13