jak rozwiązać problem renderowania Path.op () nie jest obsługiwane?


13

Jak rozwiązać ten błąd: Renderuj problem Path.op () nie jest obsługiwany

Próbowałem wymusić odświeżenie układu, zrestartować, zaktualizować Android Studio, na jakiś czas zatrzymać program antywirusowy, ale problem nadal występuje.

Zaskakująco jestem w stanie skompilować i uruchomić aplikację, ale jak pozbyć się tego błędu?

Ja używam:

  • Android Studio 3.5.3
  • Narzędzia Android SDK 29.0.2
  • Platforma Android SDK Platforma Android SDK 10.0 (Q) 29
  • Domyślny plik binarny platformy OpenJDK

aby odtworzyć błąd:

  • Utwórz nowy projekt Androida z pustą aktywnością
  • zastąp układ następującym układem:

    <?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>
    

wprowadź opis zdjęcia tutaj

Odpowiedzi:


18

Miałem ten sam problem. Powodem jest to, że nowe wersje komponentów materiałowych są dołączone do tego błędu. Próbowałem więc zastąpić wersję w skrypcie kompilacji Gradle wersją, która obsługuje Path.op().

Jedyne, co musisz zrobić, to zastąpić zależność w skrypcie kompilacji Gradle tym:

wdrożenie „com.google.android.material: materiał: 1.2.0-alpha02”


ten działa dla mnie ..
Fra Red

Pracował również dla mnie. Ikony przycisków nie były wyświetlane w układach, co rozwiązało problem.
FraK

pracował również dla mnie! dzięki
pavlos

10

Problem rozwiązany przez zastąpienie implementacji komponentu materiałowego w Gradle Build (na poziomie aplikacji)

com.google.android.material:material:1.2.0-alpha05

do

com.google.android.material:material:1.2.0-alpha02

1

Napotkałem ten sam problem. Problem poprawił się po uruchomieniu aplikacji. Myślę, że problem zostanie rozwiązany po wyczyszczeniu i przebudowaniu projektu.


1

Trochę późno, ale

implementation 'com.google.android.material:material:1.2.0-alpha06'

działa poprawnie, więc nie trzeba już obniżać wersji alpha02.


0

Wczoraj wpadłem na ten sam problem. Mój ma coś wspólnego z

com.google.android.material.appbar.AppBarLayout

składnik. Nie wiem dokładnie dlaczego, ale dodanie android:background="..."go rozwiązuje.


0

napotkano ten sam problem podczas korzystania z układu, nie jest to widoczne w edytorze układu. rozwiązany przez zmianę

implementation 'com.google.android.material:material:1.2.0-alpha03'

do

implementation 'com.google.android.material:material:1.2.0-alpha02'

0

Zastąpić

plik implementacyjny Drzewo (reż: 'libs', obejmują: ['* .jar'])

api 'com.google.android.material:material:1.2.0-alpha06'

do

plik implementacyjny Drzewo (reż: 'libs', obejmują: ['* .jar'])

api 'com.google.android.material:material:1.2.0-alpha02'
Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.