2012-05-18 5 views
8

죄송합니다.이 주제에 대해 다른 하나는 죄송합니다. 나는 지금까지 그것에 관한 모든 게시를 읽었지만, 지금까지 아무 대답도 나에게 도움이되지 못했다. 나는 지금 그것을 고치려고 노력하면서 몇 시간을 보냈고, 내 머리카락을 뽑기 시작하기 전에 여기에 또 다른 시도를하고 싶습니다.Android의 Google지도 : 현재 테마에서 'mapViewStyle'스타일을 찾지 못했습니다.

XML 레이아웃과 그래픽 레이아웃을 전환 할 때 Eclipse에서 위의 오류 메시지가 표시됩니다. 여기

Missing styles. Is the correct theme chosen for this layout? 
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references. 
Failed to find style 'mapViewStyle' in current theme 

내 레이아웃 XML 파일입니다

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

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

<application 
    android:allowBackup="true" 
    android:label="@string/app_name" > 
    <uses-library 
     android:name="com.google.android.maps" 
     android:required="true" /> 

    <activity 
     android:name=".myappActivity" 
     android:label="@string/app_name" 
     android:theme="@android:style/Theme.NoTitleBar" > 
    (etc.) 

    <activity 
     android:name=".ViewMapActivity" 
     android:label="View Map" > 
    </activity> 
    (etc.) 
: 내의 AndroidManifest.xml에서

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

<!-- Screen Design for the MAP Tab --> 
<TextView 
    android:id="@+id/vvm_offline" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:padding="15dip" 
    android:text="You have to be online to display the map." 
    android:textSize="18dip" /> 

<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:apiKey="xxx" 
    android:clickable="true" 
    android:state_enabled="true" /> 

<LinearLayout 
    android:id="@+id/zoom" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" /> 

</LinearLayout> 

, 모든 것이 내가 찾은 다른 팁에 따라해야한다로 보인다

덧붙여서 android : theme에 "theme"을 정의했는지 여부는 아무런 차이가 없습니다.

어떤 아이디어가이 오류를 수정하는 방법? 컴파일하고 앱을 실행할 수는 있지만 뷰가 생성되면 NullPointerException이 발생합니다.

+3

FYI, post scriptum : 이것에 많은 시간을 낭비한 후에는 해결 방법이없는 것 같습니다. 문제는 그래픽 레이아웃 편집기에 오류 메시지가 표시 되더라도 코드가 제대로 컴파일되고 의도 한대로 작동한다는 것입니다. 안드로이드 제작자들이 우리가 어떻게 그것을하기를 바라는지를 배우기 전까지는, 나는이 어색한 오류 메시지를 가지고 살면서 계속 나아갈 것입니다. – richey

답변

1

이전 테마 줄을 제거 고해상도> 값> styles.xml에 가서 프로젝트를 만드는 동안이 일

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

일식을 넣어 .. 너무 나에게 무슨 일이를 정의하도록 요청 응용 프로그램의 테마. Holo theme을 선택했을 수 있습니다. 이 테마는 오류를 표시하는 MapView을 지원하지 않습니다.

관련 문제