Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Android
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 23: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 at 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 at 25-Sep-12 4:21am
   
You have to generate the API key.
follow the link given to you.
Aditya_Pandey at 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
0 Maciej Los 515
1 OriginalGriff 450
2 CHill60 305
3 Abhinav S 300
4 Sergey Alexandrovich Kryukov 294
0 Sergey Alexandrovich Kryukov 9,897
1 OriginalGriff 9,395
2 Peter Leow 5,162
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,036


Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2015
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