2016-03-27 89 views
0

为什么我在Android Studio中遇到渲染问题?

<?xml version="1.0" encoding="utf-8"?> 
 
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" 
 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
 
    xmlns:tools="http://schemas.android.com/tools" 
 
    android:layout_width="match_parent" 
 
    android:layout_height="match_parent" 
 
    android:fitsSystemWindows="true" 
 
    tools:context="com.yossikally.hello.MainActivity"> 
 

 
    <android.support.design.widget.AppBarLayout 
 
     android:layout_width="match_parent" 
 
     android:layout_height="wrap_content" 
 
     android:theme="@style/AppTheme.AppBarOverlay"> 
 

 
     <android.support.v7.widget.Toolbar 
 
      android:id="@+id/toolbar" 
 
      android:layout_width="match_parent" 
 
      android:layout_height="?attr/actionBarSize" 
 
      android:background="?attr/colorPrimary" 
 
      app:popupTheme="@style/AppTheme.PopupOverlay" /> 
 

 
    </android.support.design.widget.AppBarLayout> 
 

 
    <include layout="@layout/content_main" /> 
 

 
    <!--<android.support.design.widget.FloatingActionButton--> 
 
     <!--android:id="@+id/fab"--> 
 
     <!--android:layout_width="wrap_content"--> 
 
     <!--android:layout_height="wrap_content"--> 
 
     <!--android:layout_gravity="bottom|end"--> 
 
     <!--android:layout_margin="@dimen/fab_margin"--> 
 
     <!--android:src="@android:drawable/ic_dialog_email" />--> 
 

 
</android.support.design.widget.CoordinatorLayout>

我建最简单的Hello World项目。 在xml设计窗格中,我得到图片中的内容enter image description here

试图更改主题和更改版本。得到同样的

+0

请出示您的xml文件 –

+0

whixh XML请 – jkally

+0

的一个,你必须CoordinatorLayout –

回答

0

请添加到您的应用程序文件的gradle Android Design Support Library

compile 'com.android.support:design:23.+' 
+0

接受但不完全充满。原来的23.2.0是不错的。必须改回到23.1.1,也只有那些工作的是“NoActionBar”,任何其他主题 - 例如对于renderizaton问题,Holo将给出整整一页的警告。 – jkally

相关问题