Извините, что опубликовано еще одно из них, но, похоже, нам еще предстоит документировать все решения этой проблемы.
Вот что произошло: я добавил карту, все работало персиковое. Я добавил скользящее устройство и переместил в него кнопки, а затем изменил корень node от линейного до относительного. С тех пор я получаю сообщение об ошибке в графическом макете моего класса main.xml, который читает
Отсутствующие стили. Правильная ли тема выбрана для этого макета? Используйте поле со списком Тема над макетом, чтобы выбрать другой макет или исправить ссылки на стиль темы. Не удалось найти стиль "mapViewStyle" в текущей теме.
Переключение корня node на линейный и обратно на относительный отображает карту, но ошибка все еще находится в графическом макете.
До сих пор я сделал следующие решения, которые могут решить проблему в большинстве случаев:
- Добавлен стиль style.xml для создания стиля mapView.
- Проверенная моя цель сборки - это API 2.3.3 (10)
- Убедитесь, что
<uses-library android:name="com.google.android.maps"/>
является дочерним node приложения. - Очистить/перестроить мое приложение.
- Удалено R.
- Удалено и перестроено main.xml
- Перезагрузили сервер adb, Eclipse, мой компьютер и мое устройство.
- Переключение между Android 3.0 и Android 2.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>
Если у кого-то есть решение, сообщите мне. Я сделаю все возможное, чтобы отправить сообщение, если я когда-нибудь придумаю.