2015-05-19 87 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>