2011-12-14 4 views
7

私はAndroid Mapsアプリケーションに少し問題があります。そのため、レイアウトxmlファイルにMapViewを追加すると、「現在のテーマでmapViewStyleスタイルを見つけられませんでした」というエラーメッセージが表示されます。Android - 現在のテーマでスタイル 'mapViewStyle'を見つけることができませんでした

ここに私のAndroidManifest.xmlです:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
     package="com.acilSRV.client" 
     android:versionCode="1" 
     android:versionName="1.0"> 
    <uses-sdk android:minSdkVersion="10" /> 

    <application android:icon="@drawable/icon" android:label="@string/app_name"> 

    <uses-library android:name="com.google.android.maps"/> 
     <activity android:name=".AcilActivity" 
        android:label="@string/app_name"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 

    </application> 

    <uses-permission android:name="android.permission.INTERNET"/> 
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 

</manifest> 

そしてmain.xmlというエラーメッセージが表示されます。

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    > 
<TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello" 
    /> 

    <com.google.android.maps.MapView 
    android:id="@+id/myMapView" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:enabled="true" 
    android:clickable="true" 
    android:apiKey="*******" 
    /> 

</LinearLayout> 

注:私はすでに私のGoogleマップのAPIキーをチェックしているとしても問題はありませんAPIキー。

提案がありますか?これはあまりにも私に起こった

+0

GoogleApisを含むビルドターゲットを選択しましたか? –

+0

はい、Google Apis - 10(2.3.3バージョン) –

+0

この質問の可能なミラー:http://stackoverflow.com/questions/6975203/android-google-maps-failed-to-find-style-mapviewstyle-in- current-theme –

答えて

4

、ラファエル・Tは、それは私が(端末を介して)この使用したAntビルダーを解決した... Eclipseのバグだし、それが再び:)おかげで働いていました。..前回のテーマ行を削除RES>値>のstyles.xml

に入ると、プロジェクトの作成時に、この1

<style name="AppBaseTheme" parent="android:Theme.Light" /> 

を入れて、Eclipseのは、アプリケーションのテーマを定義することが求められます。ホロのテーマを選択したかもしれません。このテーマは、エラーを表示しているMapViewをサポートしていません。

+0

最新のEclipseリリースはありますか? –

+0

はい、私はIndigoでテストしました –

+0

Juno 4.3でそれを体験しています..最新のプラットフォームツール..:S – Ewoks

1

..あなたは正しかった

関連する問題