2

This error happens when I put more than one "webview" in my layout, even with asynctask it continues, how can I run this?

I'm using AnyChart to be able to generate two graphs, however when adding more than one AnyChartView in the layout the program does not run the first graph

Even if I put runOnThreadUi, it can not run, and this error appears:

Skipped 53 frames! The application may be doing too much work on its main thread.

The error:

I/zygote64: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/TracingController; at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2) at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453) at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:128) at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:402) at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:194) at android.webkit.WebViewFactoryProvider android.webkit.WebView.getFactory() (WebView.java:2530) at void android.webkit.WebView.ensureProviderCreated() (WebView.java:2525) at void android.webkit.WebView.setOverScrollMode(int) (WebView.java:2590)

My layout:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    >

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_below="@id/linlay1"
            android:id="@+id/relBarChart"
            android:padding="10dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="sans-serif-light"
                android:text="Publicações"
                android:layout_marginStart="10dp"
                android:id="@+id/tv_bar_chart"
                android:textColor="@color/grey"
                android:textStyle="bold"
                android:textSize="12sp"
                android:layout_marginBottom="10dp"/>

            <com.anychart.AnyChartView
                android:id="@+id/bar_doughnut1"
                android:layout_below="@+id/tv_bar_chart"
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:layout_centerHorizontal="true"
                />

        </RelativeLayout>

        <LinearLayout
            android:id="@+id/linlay2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/relBarChart"
            android:orientation="horizontal"
            android:padding="10dp">


            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:layout_marginEnd="5dp"
                android:layout_marginStart="5dp"
                android:background="@color/white">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="sans-serif-light"
                    android:text="Publicações"
                    android:layout_marginStart="10dp"
                    android:layout_marginTop="10dp"
                    android:id="@+id/tv_bar_doughnut2"
                    android:textColor="@color/grey"
                    android:textStyle="bold"
                    android:textSize="12sp"
                    android:layout_marginBottom="10dp"/>

                <com.anychart.AnyChartView
                    android:id="@+id/bar_doughnut2"
                    android:layout_below="@+id/tv_bar_doughnut2"
                    android:layout_width="match_parent"
                    android:layout_height="200dp"
                    android:layout_centerHorizontal="true"
                    />

            </RelativeLayout>
        </LinearLayout>



        </RelativeLayout>
    </ScrollView>

</RelativeLayout>
Alexandre
  • 33
  • 2
  • 8
  • We need some details to provide a proper solution. Can you share with us your chart configuration code? – AnyChart Support Nov 06 '18 at 03:38
  • I'm sorry I forgot to come here and answer. Only this line of code was missing " APIlib.getInstance().setActiveAnyChartView(anyChartView); ". In the example app had a class with more than one chart. Thanks a lot – Alexandre Nov 06 '18 at 04:44

0 Answers0