Missing styles. Is the correct theme chosen for this layout?

Posted by user1820007 on Stack Overflow See other posts from Stack Overflow or by user1820007
Published on 2012-11-18T10:56:13Z Indexed on 2012/11/18 10:59 UTC
Read the original article Hit count: 4239

Filed under:

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.

I tried every solutions available to solve this problem. But nothing seems to work. I have included library in the manifest file. I even created style is styles.xml. I have chosen Google Apis build target as well.

Can somebody please give me a solution. Thank you in advance for your valuable time...

here is my xml file:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="@style/AppTheme"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >


 <com.google.android.maps.MapView
     android:id="@+id/themap"
     style="@style/mapViewStyle"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:apiKey="here i have my key"
     android:clickable="true"
     android:enabled="true" />

  </RelativeLayout>

`

Here is my manifest snippet:

  <uses-library android:name="com.google.android.maps" />

    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".Second" />

    <acttiviy android:name=".Third"  android:theme="@android:style/Theme.Black" 
                     />
  </application>

here is my style.xml file

<style name="mapViewStyle" parent="@android:style/Theme.Black">

</style>

</resources>

© Stack Overflow or respective owner

Related posts about android-layout