android fragments - Google maps v2 grey screen on AVD with 4.3 SDK 18 -


i created google api key google maps v2 android, set in eclipse google maps (using google+api build, linking google play services, api key sorted, etc), can view map app fine on phone when view same app on avd it's going right location , can see google map overlays (such zoom button) there no map, grey box. networking fine well.

i using latest 4.3 api 18 build , avd default nexus one. prior got dreaded 'update google play services' message found due maps v2 not working on 4.2 upgraded reading maps should work ok sdk 18 on avd.

any idea why it's not showing? did notice when start avd says using software opengl i'd have thought ok.

i've read various stackoverflow articles point @ incorrect configuration , mine fine , working dandy when send phone , it's throwing no errors.

if it's here snippets of code i'm using.

manifest:

<uses-sdk android:minsdkversion="9" android:targetsdkversion="18" /> <uses-permission android:name="android.permission.internet"/> <uses-permission android:name="android.permission.access_fine_location"/> <uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-feature android:glesversion="0x00020000" android:required="true" /> <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices"/> <uses-library android:name="com.google.android.maps" /> <meta-data android:name="com.google.android.maps.v2.api_key"          android:value="xxxxxxxxxxxxxxxxxxxx"/> 

layout snippet:

<fragment     android:id="@+id/worldmap"     android:name="com.google.android.gms.maps.supportmapfragment"     android:layout_width="match_parent"     android:layout_height="match_parent" /> 

code initialise map:

private void initialisemap() {     if (googlemap == null) {         googlemap = ((supportmapfragment) getfragmentmanager().findfragmentbyid(                 r.id.worldmap)).getmap();          // check if map created or not         if (googlemap == null) {             toast.maketext(activity.getapplicationcontext(),                     "unable create maps", toast.length_short)                     .show();         }     }        } 

code display map:

private void displaylocation(location l, string text) {     if(googlemap!=null) {         googlemap.setmaptype(googlemap.map_type_satellite);         latlng ll=new latlng(l.getlatitude(), l.getlongitude());         cameraposition cp=new cameraposition.builder()             .target(ll)             .zoom(18)             .build();          googlemap.animatecamera(cameraupdatefactory.newcameraposition(cp));         toast.maketext(activity, l.getlatitude()+":"+l.getlongitude(), toast.length_long).show();      } } 

you should see like

e/google maps android api﹕ google maps android api v2 supports devices opengl es 2.0 , above 

in console. known problem emulator google apis. suggest switching genymotion, works , works well.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -