Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
This is my google map view code where i find this error in xml Failed to find style 'mapViewStyle, i found a lot in google but i didn't get proper solution.

XML
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey=API KEY"
/>
Posted

You have to enter the Google MAPS API key only then this code will work.


XML
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey=API KEY"
/>



In place of API KEY, you have to enter the MAPS API KEY which is generated by google.
You'll get the link here. https://developers.google.com/maps/documentation/android/mapkey[^]
 
Share this answer
 
Comments
AndroidVivek 25-Sep-12 4:16am    
Aditya : After making this error come..
I can't write here API key that why i write API key..
Aditya_Pandey 25-Sep-12 4:21am    
You have to generate the API key.
follow the link given to you.
Aditya_Pandey 25-Sep-12 4:22am    
Go through this link. https://developers.google.com/maps/
use style="mapViewStyle" and styles="mapViewStyle" together it will not remove error but it will not gives you problem to see the map and other controls for it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900