Wednesday 15 January 2014

Android Emulator Not Showing Maps -



Android Emulator Not Showing Maps -

okk guys hello developing android app uses google maps. followed tutorial on net , completed emulator saying app won't work because google play libraries not on phone. 1. have imported google playstore library. 2. have google api image of android 5.0 next code..... manifest file

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.taxiapp" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="14" android:targetsdkversion="21" /> <permission android:name="com.taxiapp.permission.maps_receive" android:protectionlevel="signature" /> <uses-permission android:name="com.taxiapp.permission.maps_receive"/> <uses-permission android:name="com.taxiapp.permission.access_network_state"/> <uses-permission android:name="com.taxiapp.permission.write_external_storage"/> <uses-permission android:name="com.taxiapp.permission.read_gservices"/> <uses-permission android:name="com.taxiapp.permission.access_coarse_location"/> <uses-permission android:name="com.taxiapp.permission.access_fine_location"/> <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" > <meta-data android:name="com.google.android.maps.v2.api_key" android:value="aizasyaxvr6dsj58p5o4eypi8vkfdqbfoewytbe" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> <activity android:name=".homeactivity" android:label="@string/app_name" > <!-- "@string/title_activity_home" > --> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".quickbook" android:label="@string/title_activity_quick_book" > </activity> </application> </manifest>

this layout file

<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" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context="com.taxiapp.quickbook" > <fragment android:id="@+id/map" android:name="com.google.android.gms.maps.mapfragment" android:layout_width="fill_parent" android:layout_height="fill_parent" /> </relativelayout>

this activity

package com.taxiapp; import android.app.activity; import android.os.bundle; import android.view.menu; import android.view.menuitem; import com.google.android.gms.maps.googlemap; public class quickbook extends activity { googlemap map; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_quick_book); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.quick_book, menu); homecoming true; } @override public boolean onoptionsitemselected(menuitem item) { // handle action bar item clicks here. action bar // automatically handle clicks on home/up button, long // specify parent activity in androidmanifest.xml. int id = item.getitemid(); if (id == r.id.action_settings) { homecoming true; } homecoming super.onoptionsitemselected(item); } }

![enter image description here][1]

here project explorer showing imported google play library

![enter image description here][2]

i not able post snapshot of emulator activity opens , view saying "this app wont run without google play servies, missing phone"

i using google maps api 2

from remember when implementing google maps, can't utilize doesn't back upwards google play services. found cool emulator: http://www.genymotion.com/

maybe take @ see if helps!

android google-maps emulator google-play-services

No comments:

Post a Comment