これらのうちのもう1つを投稿して申し訳ありませんが、この問題のすべての解決策をまだ文書化していないようです。
何が起こったのか:私はマップビューを追加しました、すべてが桃色に機能していました。スライドドロワーを追加してボタンを移動し、ルートノードを線形から相対に変更しました。それ以来、main.xmlクラスのグラフィックレイアウトで次のようなエラーが発生します。
欠落しているスタイル。このレイアウトに正しいテーマが選択されていますか?レイアウトの上にあるテーマコンボボックスを使用して、別のレイアウトを選択するか、テーマスタイルの参照を修正します。現在のテーマでスタイル'mapViewStyle'が見つかりませんでした。
ルートノードを線形に切り替えて相対に戻すと、マップが表示されますが、エラーはまだグラフィックレイアウトにあります。
これまでのところ、次の解決策を実行しました。これにより、ほとんどの場合に問題が解決する可能性があります。
- 'mapView'スタイルを作成するためのstyle.xmlを追加しました。
- ビルドターゲットがAPI2.3.3(10)であることを確認しました
<uses-library android:name="com.google.android.maps"/>
アプリケーションの子ノードであることを確認してください。- アプリケーションをクリーンアップ/再構築しました。
- Rを削除しました。
- main.xmlを削除して再構築しました
- adbサーバー、Eclipse、コンピューター、およびデバイスを再起動しました。
- グラフィックレイアウトでAndroid3.0とAndroid2.3.3を切り替えました。
しかし、私の問題は解決しません。これが私のレイアウトxmlです。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
style="@style/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:apiKey="asdf" //not my real key
android:clickable="true" />
<!-- TODO: update the API key with release signature -->
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:content="@+id/content"
android:handle="@+id/handle" >
<Button
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Menu" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/about"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/about" />
<Button
android:id="@+id/record"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/record" />
<Button
android:id="@+id/start"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/start" />
</LinearLayout>
</SlidingDrawer>
</RelativeLayout>
これが私のマニフェストxmlです。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.myschoolhere"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="com.google.android.maps"/>
<activity
android:name=".GeoTagActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
誰かが解決策を持っているなら、私に知らせてください。私がそれを理解した場合、私はポストバックするために最善を尽くします。