Unable to start activity ComponentInfo: android.view.InflateException: Binary XML file line #7: Error inflating class fragment -


i'm developing app in need show google map using google map v2. i'm getting following error , automatically app stoped. unable start activity componentinfo{com.example.getlocation/com.example.getlocation.show}: android.view.inflateexception: binary xml file line #7: error inflating class fragment

my minsdk 12.

show.java

import android.app.activity; import android.os.bundle; import android.widget.toast;  import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.mapfragment;  public class show extends activity {      private googlemap googlemap;      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_show);           try {                 // loading map                 initilizemap();              } catch (exception e) {                 e.printstacktrace();             }       }     /**      * function load map. if map not created create      * */     private void initilizemap() {         if (googlemap == null) {             googlemap = ((mapfragment) getfragmentmanager().findfragmentbyid(                     r.id.map)).getmap();              // check if map created or not             if (googlemap == null) {                 toast.maketext(getapplicationcontext(),                         "sorry! unable create maps", toast.length_short)                         .show();             }         }     }      @override     protected void onresume() {         super.onresume();         initilizemap();     }  } 

show.xml

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"        tools:context="com.example.getlocation.show" >    <fragment          android:id="@+id/map"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:name="com.google.android.gms.maps.mapfragment"/>  </relativelayout> 

manifest

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.getlocation"     android:versioncode="1"     android:versionname="1.0" >      <permission         android:name="com.example.getlocation.permission.maps_receive"         android:protectionlevel="signature" />      <uses-permission android:name="com.example.getlocation.permission.maps_receive" />      <uses-sdk         android:minsdkversion="12"         android:targetsdkversion="21" />      <uses-permission android:name="android.permission.access_network_state" />     <uses-permission android:name="android.permission.internet" />     <uses-permission android:name="com.google.android.providers.gsf.permission.read_gservices" />     <uses-permission android:name="android.permission.write_external_storage" />      <!-- required show current location -->     <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" />      <application         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <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>         </activity>          <!-- goolge api key -->         <meta-data             android:name="com.google.android.maps.v2.api_key"             android:value="aizasybcmyxiohjpfyelj67oskbjwsz8fren3jg" />          <activity             android:name=".show"             android:label="@string/title_activity_show" >         </activity>     </application>  </manifest> 

i tried lot still getting same error...

thanks in advance.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -