Android Studio中渲染问题的原因

Android Studio中渲染问题的原因,android,android-studio,android-layout,android-studio-3.0,Android,Android Studio,Android Layout,Android Studio 3.0,大家好,我想问一下我在设计应用程序时在Android studio中遇到的一些问题,当我在xml中设计布局视图时,我将从设计更改为文本,然后转到设计选项卡,在我遇到错误渲染问题后,我在设计页面中的缩放或减号按钮无法再按下,并停留在我以前缩放的百分比。问题是,即使在我删除了错误代码中的问题后,它也无法修复 我曾尝试创建一个新的xml,这不是问题,但在我尝试将有问题的xml复制并粘贴到新的xml后,新的xml也会遇到同样的问题 但是,如果我将修复项放入新项中,问题将不会发生,但是如果文本中出现错误,

大家好,我想问一下我在设计应用程序时在Android studio中遇到的一些问题,当我在xml中设计布局视图时,我将从设计更改为文本,然后转到设计选项卡,在我遇到错误渲染问题后,我在设计页面中的缩放或减号按钮无法再按下,并停留在我以前缩放的百分比。问题是,即使在我删除了错误代码中的问题后,它也无法修复

我曾尝试创建一个新的xml,这不是问题,但在我尝试将有问题的xml复制并粘贴到新的xml后,新的xml也会遇到同样的问题

但是,如果我将修复项放入新项中,问题将不会发生,但是如果文本中出现错误,然后切换到设计选项卡,渲染缩放按钮再次出现问题,这是android studio的问题还是我的
android studio的问题?在我以前的经历中,我从未遇到过这样的事情。目前我正在使用
AS 3.2.1

编辑: 这是我当前的xml,已经更正

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:frisson="http://schemas.android.com/apk/res-auto"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:id="@+id/activity_main"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="#fff"
              android:orientation="vertical">

    <RelativeLayout android:layout_width="match_parent"
                    android:layout_height="wrap_content">

        <android.support.design.widget.AppBarLayout
                android:id="@+id/toolbar_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#ec018b00"
                app:elevation="0dp"
                android:theme="@style/AppTheme.AppBarOverlay">

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

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

        <com.intrusoft.library.FrissonView
                android:layout_below="@+id/toolbar_layout"
                android:id="@+id/wave_head"
                android:layout_width="match_parent"
                android:layout_height="250dp"
                android:scaleType="centerCrop"
                frisson:tideCount="3"
                frisson:tideHeight="40dp"
                frisson:gradientType="linear"
                frisson:alphaValue="100"
                frisson:tintColor="@color/green_700"/>

        <android.support.v7.widget.CardView
                android:id="@+id/image"
                android:layout_width="120dp"
                android:layout_height="120dp"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                frisson:cardCornerRadius="60dp">

            <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:scaleType="centerCrop"
                    android:src="@drawable/sample_ic_happy"/>
        </android.support.v7.widget.CardView>
    </RelativeLayout>

    <ScrollView android:layout_width="match_parent"
                android:layout_height="wrap_content">
        <LinearLayout android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="vertical">

        </LinearLayout>
    </ScrollView>
</LinearLayout>


然后我将可绘制的src修改为@drawable/sample\u ic\u happy的正确src,这意味着问题已经解决了,对吗?但问题是我的zomm按钮仍然因为之前的渲染错误而被卡住,无法单击,为什么?

这是一个永恒的问题。我周期性地得到同样的结果

首先,尝试重建项目-在大多数情况下,它会有所帮助。 如果没有-请参阅本页的建议:

我指的是第一个(降低API级别)和第二个(关于自定义视图)


希望能对你有所帮助。

这是可能的。您可以发布您的xml吗?请显示您的xml在哪里面临问题您是想降低gradle中的API还是设计预览中的API?我曾试图降低设计预览一,但没有回应,它仍然得到我的errorA设计预览API。您可以尝试清理项目并重建它。有时会有帮助。是的,有时我试着重建它+清理项目+重新启动缓存,这是真的,问题已经解决了,但有时在你工作之后,它又会卷土重来,这就是为什么我搞不清楚有什么解决方案吗?当您在“文本”选项卡中键入“全部”,然后转到“design Get render problem”错误时,这相当烦人,需要重新启动才能使用它。
<ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                android:src="@drawable/sample_ic_happy2"/>