android - When using a tethered device to debug, which Google Maps API key do I use? -
i know there number of questions using google maps api key, none of them have been answered since v1 went extinct. having trouble loading in map tiles on mapview. using api key derived debug keystore , debugging using nexus 7 tethered via usb. somewhere believe read if using usb debugging, debug key not work - true? how work around if cannot virtual device run on machine? mapview shows fine, getting "server returns 3" error, understand has key not matching. here's view in layout file, manfiest:
<com.google.android.maps.mapview android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="100dp" android:clickable="true" android:apikey="aizasydxlqso2xzo4vhlt3gqzafuoyt081cao8m" android:visibility="visible" />
manifest
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.casson.sherpy" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="11" android:targetsdkversion="17" /> <uses-permission android:name="android.permission.access_fine_location"/> <permission android:name="com.example.mapdemo.permission.maps_receive" android:protectionlevel="signature"/> <uses-permission android:name="com.example.mapdemo.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-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" android:permission="android.permission.access_fine_location"> <uses-library android:name="com.google.android.maps" /> <activity android:name="com.casson.sherpy.mainactivity" android:label="@string/app_name" android:theme="@android:style/theme.notitlebar" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.api_key" android:value="aizasydxlqso2xzo4vhlt3gqzafuoyt081cao8m"/> </application> </manifest>
there's no problem using debug key debugging on. may due lack of uses-library statement in manifest. i'd suggest moving on v1 current version- keys easier deal there (you need put key , appname website, not in xml @ all).
Comments
Post a Comment