I am able to ZOOM IN and ZOOM OUT, and I am also able to put an icon marker, but the problem is that the Map doesn't appear, all I can see is a GRID.. What's supposed to be the problem here? Does this involved the Google Maps API?
Asked
Active
Viewed 2,519 times
1
-
it showsing grid means you need to sign your application and then run. – Vigbyor Nov 21 '13 at 14:48
-
how do I sign my app? sorry, I'm still a beginner.. – myooomyoo Nov 21 '13 at 14:50
-
Its very easy visit this http://developer.android.com/tools/publishing/app-signing.html – Vigbyor Nov 21 '13 at 14:51
-
do you paste the api key in Androidmanifest.xml.... – vinay Maneti Nov 21 '13 at 14:52
-
@ManetiVinay I have it on the activity_main.xml based on my source of codes.. – myooomyoo Nov 21 '13 at 14:59
-
What you have tried post your code first so that i can help you. – Shailendra Madda Nov 21 '13 at 15:05
-
@shylendra i can't post my codes.. I'm still a newbie and I still have restrictions.. – myooomyoo Nov 21 '13 at 15:17
-
@Banananadss Have a look at bellow I edited my answer bellow and I got map in emulater too.. – Shailendra Madda Nov 21 '13 at 15:19
-
@shylendra i am still working on it.. thank you.. – myooomyoo Nov 21 '13 at 15:23
-
Duplicate?: [Map not getting in emulator android api v2](http://stackoverflow.com/q/19094787/456814). – Aug 13 '14 at 19:40
4 Answers
1
I got finally map in my emulator. I followed these steps to achieve it.
Create avd and start emulator
Go to platform tools path present in Android SDK and put these apk's in it.
- com.android.vending-20130716
- com.google.android.gms-20130716
- Install these apk's one by one by going to platform tools path by using command prompt(shift+Right click-->open command window here).Follow these commands
- adb devices
- adb install com.android.vending-20130716
- adb install com.google.android.gms-20130716
- Import google-play-services_lib project which is present at project location and add it to your project.
- Restart emulator and clean your project and run it through emulator.
That's it. :) you can download above apk's from following link
Running Google Maps v2 on the Android emulator

Community
- 1
- 1

Shailendra Madda
- 20,649
- 15
- 100
- 138
-
-
I can't post a photo.. I have the screen caption of the cmd, do you have facebook? I will just link the photo on facebook. – myooomyoo Nov 22 '13 at 14:10
-
-
https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-ash3/1456093_190058161184199_464781303_n.jpg here's the link.. – myooomyoo Nov 22 '13 at 14:27
0
try to add meta tag of goolge play services..
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

vinay Maneti
- 1,447
- 1
- 23
- 31
-
-
and even you should enable google map api v2 in service of google map api console... – vinay Maneti Nov 21 '13 at 14:58
-
Are you generated api key with package name present in Android manifest file? – Shailendra Madda Nov 21 '13 at 15:00
-
-
then are you getting any error in log-cat ,if you have you post it. – vinay Maneti Nov 21 '13 at 15:11
-
are the errors colored red? i have yellow oranges in my log cat.. sorry, i'm also a beginner in using Eclipse.. still on the process in learning.. – myooomyoo Nov 21 '13 at 15:24
0
See here: Running Google Maps v2 on the Android emulator
Emulators don't like the v2 of google maps. Test on a real device if the map stays grey. If it does, your signing keys will most likely be misconfigured. Make sure that you also have you develop key registered on the Google API console.
0
this is in my Android Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.cmumap"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<permission
android:name="com.android.cmumap.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.android.cmumap.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name">
<activity android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my API key"/>
</activity>
<uses-library android:name="com.google.android.maps" />
<meta-data
android:name="com.google.android gms.version"
android:value="@integer/google_play_services_version"/>
</application>
</manifest>
for the Main Activity, I have these
package com.android.cmumap;
import java.util.List;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;
public class MainActivity extends MapActivity {
private MapView mapView;
private static final int latitudeE6 = 37985339;
private static final int longitudeE6 = 23716735;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mapView = (MapView) findViewById(R.id.map_view);
mapView.setBuiltInZoomControls(true);
List mapOverlays = mapView.getOverlays();
Drawable drawable = this.getResources().getDrawable(R.drawable.ic_launcher);
CustomItemizedOverlay itemizedOverlay =
new CustomItemizedOverlay(drawable, this);
GeoPoint point = new GeoPoint(latitudeE6, longitudeE6);
OverlayItem overlayitem =
new OverlayItem(point, "Hello", "I'm in Athens, Greece!");
itemizedOverlay.addOverlay(overlayitem);
mapOverlays.add(itemizedOverlay);
MapController mapController = mapView.getController();
mapController.animateTo(point);
mapController.setZoom(6);
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
}
and this of the activity_main
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:enabled="true"
android:apiKey="my API Key" />
</RelativeLayout>

myooomyoo
- 135
- 2
- 5
- 15