Android Studio 2.3不显示布局设计
我刚刚升级到Android Studio 2.3,但当我尝试显示此布局时:Android Studio 2.3不显示布局设计,android,user-interface,android-studio,graphical-layout-editor,android-studio-2.3,Android,User Interface,Android Studio,Graphical Layout Editor,Android Studio 2.3,我刚刚升级到Android Studio 2.3,但当我尝试显示此布局时: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.co
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_margin="@dimen/card_margin"
android:elevation="3dp"
app:cardBackgroundColor="@color/transparent"
android:background="@color/transparent"
app:cardCornerRadius="@dimen/card_album_radius">
<RelativeLayout
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/thumbnail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:clickable="true"
android:scaleType="fitCenter" />
<ImageView
android:id="@+id/alarm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/toolbar_alarm"
android:alpha="0.35"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:paddingBottom="@dimen/songs_count_padding_bottom"
android:paddingLeft="@dimen/album_title_padding"
/>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/songs_count_padding_bottom"
android:paddingLeft="@dimen/album_title_padding"
android:paddingRight="@dimen/album_title_padding"
android:layout_toRightOf="@id/alarm"
android:layout_alignParentBottom="true"
android:textSize="@dimen/songs_count"
tools:text="Sample Title" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16sp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:textColor="@color/album_title"
android:textSize="@dimen/note_card_title"
android:textStyle="normal"
/>
<ImageView
android:id="@+id/overflow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:scaleType="centerCrop"
android:src="@drawable/ic_dots" />
</RelativeLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
单击
修复生成路径
或其他链接无效。这解决了我的问题:
将样式父项更改为Theme.AppCompat.Light.NoActionBar
,而不是styles.xml中的Theme.AppCompat.Light.darkaActionBar
。。。。。。。。。这对我有用
尝试检查您的依赖关系。升级到Android Studio 2.3后,我的gradle崩溃了
build.gradle文件中是否存在所有必需的支持库(v7)?好像找不到。
The following classes could not be found:
- android.support.v7.app.WindowDecorActionBar (Fix Build Path, Edit XML, Create Class)
- android.support.v7.widget.ActionBarContainer (Fix Build Path, Edit XML, Create Class)
- android.support.v7.widget.ActionBarContextView (Fix Build Path, Edit XML, Create Class)
- android.support.v7.widget.ActionBarOverlayLayout (Fix Build Path, Edit XML, Create Class)
- android.support.v7.widget.ContentFrameLayout (Fix Build Path, Edit XML, Create Class)