Click here to Skip to main content
13,151,912 members (45,761 online)
Rate this:
 
Please Sign up or sign in to 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 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 23-Sep-12 22:42pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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


<?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[^]
  Permalink  
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/
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web02 | 2.8.170924.2 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100