当前位置: 首页 > 知识库问答 >
问题:

如何解决呈现问题path.op()不支持?

汪皓
2023-03-14

我试图强制刷新布局,重启,更新Android Studio,停止杀毒一段时间,但问题仍然在那里。

令人惊讶的是,我能够编译和运行应用程序,但如何摆脱这个错误?

我正在使用:

  • Android Studio 3.5.3
  • Android SDK工具29.0.2
  • Android SDK平台Android 10.0(Q)Android SDK平台29
  • 默认OpenJDK平台二进制

要再现错误,请执行以下操作:

>

  • 使用空活动创建新的Android项目
  • 将布局替换为以下布局:

    <?xml version="1.0" encoding="utf-8"?>    <androidx.coordinatorlayout.widget.CoordinatorLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/parent_view"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity"
        android:background="@android:color/white">
    
    
        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
    
            <include layout="@layout/toolbar" />
    
        </com.google.android.material.appbar.AppBarLayout>
    
        <androidx.core.widget.NestedScrollView
            android:id="@+id/nested_scroll_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipToPadding="false"
            android:scrollbars="none"
            android:scrollingCache="true"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">
    
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
    
                <androidx.cardview.widget.CardView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:cardCornerRadius="0dp"
                    app:cardElevation="2dp">
    
                    <RelativeLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">
    
                        <androidx.viewpager.widget.ViewPager
                            android:id="@+id/pager"
                            android:layout_width="match_parent"
                            android:layout_height="250dp"
                            android:layout_alignParentLeft="true"
                            android:layout_alignParentStart="true"
                            android:layout_alignParentTop="true"
                            android:background="@android:color/darker_gray" />
    
                        <RelativeLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_alignParentBottom="true"
                            android:layout_centerHorizontal="true"
                            android:orientation="vertical"
                            android:paddingBottom="16dp"
                            android:paddingLeft="12dp"
                            android:paddingRight="12dp"
                            android:paddingTop="14dp">
    
                            <LinearLayout
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:orientation="vertical">
    
                                <TextView
                                    android:id="@+id/title"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="Title is going here"
                                    android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                                    android:textColor="@android:color/white" />
    
    
    
    
    
                                <TextView
                                    android:id="@+id/brief"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text=" Location"
                                    android:textAppearance="@style/TextAppearance.AppCompat.Small"  />
    
    
                            </LinearLayout>
    
                            <LinearLayout
                                android:id="@+id/layout_dots"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentBottom="true"
                                android:layout_alignParentEnd="true"
                                android:layout_alignParentRight="true"
                                android:layout_gravity="end"
                                android:gravity="center"
                                android:orientation="horizontal" />
    
    
                        </RelativeLayout>
    
                    </RelativeLayout>
    
                </androidx.cardview.widget.CardView>
    
                <View
                    android:layout_width="0dp"
                    android:layout_height="16dp" />
    
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="16dp"
                    android:orientation="vertical">
    
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Description"
                        android:textAppearance="@style/TextAppearance.AppCompat.Large"
                        android:textColor="@android:color/darker_gray" />
    
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="6dp"
                        android:lineSpacingExtra="4dp"
                        android:text="very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum very_long_lorem_ipsum "
                        android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
                        android:textColor="@android:color/darker_gray"/>
    
    
                </LinearLayout>
    
                <View
                    android:layout_width="0dp"
                    android:layout_height="8dp" />
    
    
            </LinearLayout>
    
        </androidx.core.widget.NestedScrollView>
    

  • 共有1个答案

    周浩淼
    2023-03-14

    我也面临同样的问题。原因是,新版本的Material组件与这个bug捆绑在一起。因此,我尝试用支持path.op()的版本替换Gradle构建脚本中的版本。

    因此,您要做的唯一一件事就是用以下内容替换Gradle构建脚本中的依赖项:

    实现'com.google.android.material:material:1.2.0-alpha02'

     类似资料:
    • 问题内容: 下面的程序引发NullPointerException。在Log cat中,它显示: 单击该按钮时,它不会进入Mousefragment类。我试图解决它,但是我不能-如何解决这个问题? 编辑 单击该按钮多少次,该异常随同invalid_ip Toast消息一起显示 问题答案: 如前所述,您的问题询问如何解决此问题。 您需要弄清楚在哪里抛出。为此,请查看堆栈跟踪以查看引起问题的行。然后,

    • 问题内容: 我在做一个 用。我有我的输出。有人可以帮我吗?谢谢。 sendMailServlet代码: 在GlassFish 2.1上的输出: 问题答案: 您需要实施一个自定义 现在在 另请查看JavaMail常见问题解答

    • 本文向大家介绍解决nginx不支持thinkphp中pathinfo的问题,包括了解决nginx不支持thinkphp中pathinfo的问题的使用技巧和注意事项,需要的朋友参考一下 下面小编通过文字加代码的方式给大家详解下,具体内容如下: 其实,要解决nginx不支持pathinfo的问题,有两个解决思路,一是不使用pathinfo模式,二是修改nginx的配置文件,使它支持pathinfo。为

    • 我想实现回收器视图布局,但我得到错误“呈现问题”。我尝试添加include,但错误仍然存在。我该如何解决问题呢? 错误:I

    • 本文向大家介绍如何解决数据不平衡问题?相关面试题,主要包含被问及如何解决数据不平衡问题?时的应答技巧和注意事项,需要的朋友参考一下 这主要是由于数据分布不平衡造成的。解决方法如下: 采样,对小样本进行加噪声采样,对大样本进行下采样 进行特殊的加权,如在Adaboost中或者SVM 采用对不平衡数据集不敏感的算法 改变评价标准:用AUC|ROC来进行评价 考虑数据的先验分布 https://blog

    • 我的问题是,在log4j中是否有任何中心位置,在那里一个单独的更改就可以解决这个问题?