2015-10-06 89 views
0

我的文件:改變Android的風格,但應用程序的名稱崩潰

styles.xml:

<style name="AppTheme.NoActionBar"> 
    <item name="colorPrimary">@color/red</item> 
    <item name="colorAccent">@color/blue</item> 
    <item name="windowActionBar">false</item> 
    <item name="windowNoTitle">true</item> 
</style> 

AndroidManifest.xml中(部分):

<activity android:name=".actionbar.ActionBarSlider" 
     android:theme="@style/AppTheme.NoActionBar" 
     android:parentActivityName=".Home"> 
     <meta-data 
      android:name="android.support.PARENT_ACTIVITY" 
      android:value="de.*****.testapp.Home" /> 
    </activity> 


後我改變

<style name="AppTheme.NoActionBar"><style name="ActionBarSlider" parent="AppTheme.NoActionBar">

android:theme="@style/AppTheme.NoActionBar"android:theme="@style/ActionBarSlider"

上啓動應用程序崩潰。 我的錯誤是什麼?

+0

你可以提供你的logcat嗎? http://stackoverflow.com/help/mcve –

+0

您是否嘗試過後清理您的項目?有時候使用XML會導致R不同步。 – durbnpoisn

+0

@MarianoZorrilla adm:http://puu.sh/kASIX/11e83c4c01.png –

回答

0

10-06 22:00:33.730 717-731 /? W/WindowManager: java.lang.RuntimeException:二進制XML文件行#31:您必須提供 layout_height屬性。

在你的主activitys佈局資源文件(在線31)你有不有android:layout_height=""屬性的LinearLayout元素。

+0

我不這麼認爲:http://pastebin.com/nucQJ45C 我也試着改變'android:layout_height =「?attr/actionBarSize」 ''match_parent'沒有成功 –

+0

比在你的ViewPager中的片段之一? – zkminusck

+0

否:(http://pastebin.com/3w1iS6sW –