2011-12-14 4 views
7

Android Maps Application에 약간 문제가 있습니다. 그래서 내 레이아웃 XML 파일에 MapView를 추가하면 "현재 테마의 스타일 'mapViewStyle'을 찾을 수 없습니다"라는 오류 메시지가 표시됩니다. 이 오류 메시지가 나타납니다Android - 현재 테마에서 'mapViewStyle'스타일을 찾지 못했습니다.

<?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> 

참고 : 여기에

내 AndroidManifest.xml에있어 이미 내 Google Maps 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, 그건 내가 (터미널을 통해)이 사용 개미 빌더를 해결 한 ... 이클립스 버그, 그리고 다시 :) 감사했습니다 .. 이전 테마 줄을 제거 고해상도> 값> styles.xml

에 가서 프로젝트를 생성하는 동안이 하나

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

을 넣어, Eclipse는 응용 프로그램에 대한 테마를 정의하도록 요청합니다. Holo 테마를 선택했을 수도 있습니다. 이 테마는 오류를 표시하는 MapView를 지원하지 않습니다.

+0

최신 Eclipse 릴리스가 있습니까? –

+0

예, Indigo에서 테스트했습니다 –

+0

Juno 4.3에서 발생했습니다 ... 최신 플랫폼 도구 .. : S – Ewoks

1

.. 당신이 옳았

관련 문제