无法使用sherlock找到mapViewStyle

时间:2013-05-23 09:07:09

标签: android styles android-mapview

在我的应用程序mapview工作正常,但突然有一天,当我刚刚编写xml文件时,错误甚至没有改变目标sdk,清理重建和删除R.java文件。还将styles.xml文件更改为Theme.Light但仍显示错误。这是我的mapView xml和清单文件。

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".WAmIActivity" >

    <com.google.android.maps.MapView
        android:id="@+id/mapView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:apiKey="0dtHyV-rxfPOpVnbG700kdJIIx3DIxRid59K_mg"
        android:clickable="true"
        android:enabled="true"
        android:visibility="visible" />

</RelativeLayout>

Manifest file :-

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.mygooglemapactivity"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/SherlockTheme" >


        <uses-library
            android:name="com.google.android.maps"/>


       <activity
            android:name=".MainActivity"
            android:label="MainActivity" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".MainScreenActivity"
            android:label="MainScreenActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

    </application>

</manifest>

1 个答案:

答案 0 :(得分:0)

该密钥已正式丢失,并且没有针对Google地图v1的更新。使用Google地图v2。

请参阅网站。

https://developers.google.com/maps/documentation/android/intro