2015-05-19 85 views
4

我更新了Android studio到1.2.1.1的最新版本1.2.2,但是我的項目和新項目有問題.. 所有佈局文件無法顯示,因爲這個問題的預覽:渲染問題:Android Studio 1.2.1.1和Gradle 1.2.3

Rendering problems 

The following classes could not be found: android.support.v7.internal.widget.ActionBarOverlayLayout 

我找到解決方案,這其中改變主題:

Base.Theme.Appcompat 

但現在不顯示任何自定義視圖,甚至Appcompat視圖。它給我這個錯誤:

The following classes could not be found: - android.support.v7.widget.Toolbar (Fix Build Path, Create Class) 
The following classes could not be found: - CustomView.VoiceView (Fix Build Path, Create Class) 
Tip: Try to build the project. 

我也試過渲染的版本改爲21,而不是22 .. 它不work..Clean,重建沒有做任何事情..提前 感謝。

更新[添加style.xml]: 我的風格的代碼是:

<resources> 

    <!-- Base application theme. --> 
    <style name="AppTheme" parent="@style/Base.Theme.AppCompat.Light.DarkActionBar"> 
     <!-- Customize your theme here. --> 
     <item name="colorPrimary">@color/light_blue_500</item> 
     <item name="colorPrimaryDark">@color/light_blue_700</item> 
     <item name="colorAccent">@color/light_ornage_500</item> 
    </style> 



    <style name="RevealOrange" parent="@style/Base.Theme.AppCompat.Light.DarkActionBar"> 
     <!-- Customize your theme here. --> 
     <item name="colorPrimary">@color/light_blue_500</item> 
     <item name="colorPrimaryDark">@color/light_ornage_700</item> 
     <item name="colorAccent">@color/light_ornage_500</item> 
    </style> 

</resources> 
+0

顯示您的styles.xml –

+0

@Nilesh更新與style.xml代碼..請檢查它。 – mohamedsaber00

+0

嘗試使用noActionbar主題 –

回答

-1

這個主題很適合我試試這個

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> 
     <item name="colorPrimary">@color/my_awesome_color</item> 
     <item name="colorPrimaryDark">@color/my_awesome_darker_color</item> 
     <item name="colorAccent">@color/accent</item> 
    </style> 
+0

mmm。它不工作:(...你有哪個版本的Android工作室和Gradle? – mohamedsaber00

-1

可能與Android工作室建設有目標項目問題等於或大於21,minSdk非常低,如10.像下面那樣創建values-v21/styles。

<style name="AppTheme" parent="android:Theme.Material"> 
    <item name="colorPrimary">@color/my_awesome_color</item> 
    <item name="colorPrimaryDark">@color/my_awesome_darker_color</item> 
    <item name="colorAccent">@color/accent</item> 
</style>