android - Google Maps v2 not loading -


google maps not load , gives blank screen tried few guides , tried google's guide none seem work have added, couldnt find problem :-/

logcat:

06-27 01:21:16.470: i/google maps android api(12628): google play services client version: 4452000 06-27 01:21:16.490: i/google maps android api(12628): google play services package version: 4452036 06-27 01:21:16.790: d/dalvikvm(12628): gc_for_alloc freed 3003k, 16% free 17823k/21008k, paused 32ms, total 33ms 06-27 01:21:16.800: i/fpp(12628): making creator dynamically 06-27 01:21:16.800: i/google maps android api(12628): google play services client version: 4452000 06-27 01:21:16.810: w/activitythread(12628): classloader.loadclass: class loader returned thread.getcontextclassloader() may fail processes host multiple applications. should explicitly specify context class loader. example: thread.setcontextclassloader(getclass().getclassloader()); 06-27 01:21:17.261: i/google maps android api(12628): failed contact google servers. attempt made when connectivity established. 06-27 01:21:24.709: d/dalvikvm(12628): gc_for_alloc freed 3259k, 15% free 19643k/23084k, paused 40ms, total 40ms 06-27 01:21:32.367: e/google maps android api(12628): failed load map. error contacting google servers. authentication issue (but due network errors). 

android manifest:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     android:versionname="1.0.0"     android:versioncode="1"     package="com.sahaab.android.muslimzone.test" >     <uses-sdk android:minsdkversion="11" android:targetsdkversion="19" />      <!-- following 2 permissions not required use      google maps android api v2, recommended. -->     <uses-permission android:name="android.permission.access_coarse_location"/>     <uses-permission android:name="android.permission.access_fine_location"/>      <!-- required opengl es 2.0. maps v2 -->     <uses-feature         android:glesversion="0x00020000"         android:required="true" />          <permission             android:name="com.sahaab.android.muslimzone.test.permission.maps_receive"             android:protectionlevel="signature"/>      <uses-permission android:name="com.sahaab.android.muslimzone.test.permission.maps_receive"/>      <uses-permission android:name="android.permission.internet" />     <uses-permission android:name="android.permission.access_network_state" />     <uses-permission android:name="android.permission.write_external_storage" />     <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices"/>     <uses-feature         android:name="android.hardware.location"         android:required="false" />     <uses-feature         android:name="android.hardware.location.network"         android:required="false" />     <uses-feature android:name="android.hardware.location.gps" />     <uses-feature         android:name="android.hardware.wifi"         android:required="false" />          <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <meta-data             android:name="com.google.android.gms.version"             android:value="@integer/google_play_services_version" />         <meta-data              android:name="com.google.android.maps.v2.api_key"              android:value="aizasydtkyw-kws9vkb40pv7qhw972blaz-gd1a" />          <activity             android:name="com.sahaab.muslimzone.activity.mainactivity"             android:label="@string/app_name"             android:launchmode="singletop" >             <meta-data android:name="android.support.parent_activity" android:value=".activities.myactivity" />             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity>                  <activity             android:name="com.sahaab.muslimzone.activity.infoactivity"             android:label="@string/app_name"             android:launchmode="singletop" >             <meta-data android:name="android.support.parent_activity" android:value=".activities.myactivity" />             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.default" />             </intent-filter>         </activity>                        <activity             android:name="com.sahaab.muslimzone.activity.iqamahactivity"             android:label="@string/app_name"             android:launchmode="singletop" >             <meta-data android:name="android.support.parent_activity" android:value=".activities.myactivity" />             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.default" />             </intent-filter>         </activity>                </application>  </manifest> 

activity :

package com.sahaab.muslimzone.activity;  import com.sahaab.android.muslimzone.test.r;  import android.app.activity; import android.os.bundle;  public class iqamahactivity extends activity {      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_iqamah);     } } 

layout :

<?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk/res/android"           android:id="@+id/iqamah_map"           android:layout_width="match_parent"           android:layout_height="match_parent"           android:name="com.google.android.gms.maps.mapfragment"/> 

update code .i hope helps . working me !

package com.sahaab.muslimzone.activity;  import com.sahaab.android.muslimzone.test.r;  import android.app.activity; import android.os.bundle;  public class iqamahactivity extends fragmentactivity {  googlemap map;      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_iqamah); map =((supportmapfragment)getsupportfragmentmanager().findfragmentbyid(r.id.iqamah_map)).getmap();      } } 

change xml

 <?xml version="1.0" encoding="utf-8"?>     <fragment xmlns:android="http://schemas.android.com/apk/res/android"               android:id="@+id/iqamah_map"               android:layout_width="match_parent"               android:layout_height="match_parent"               android:name="com.google.android.gms.maps.supportmapfragment" /> 

for,more information please visit here


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -