Android MapView错误:无法找到样式'mapViewStyle [英] Android MapView Error : Failed to find style 'mapViewStyle
本文介绍了Android MapView错误:无法找到样式'mapViewStyle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的Google地图视图代码,我在xml中发现此错误未能找到样式" mapViewStyle ,我在Google中找到了很多,但没有得到正确的解决方案.
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"
/>
推荐答案
仅需输入Google MAPS API密钥,此代码才能起作用.
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"
/>
代替API KEY,您必须输入由Google生成的MAPS API KEY.
您将在此处获得链接. https://developers.google.com/maps/documentation/android/mapkey [ ^ ]
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[^]
使用样式="mapViewStyle"和styles ="mapViewStyle"一起使用不会消除错误,但不会给您带来麻烦,无法查看地图及其其他控件.
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.
这篇关于Android MapView错误:无法找到样式'mapViewStyle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文