Open fllaryora opened 2 years ago
The chart was thought to be used for UI thead only Caused by: java.lang.RuntimeException: Can't create handler inside thread Thread[pool-10-thread-1,5,main] that has not called Looper.prepare() I think mGestureDetector = new GestureDetector(chart.getContext(), this); is failing here. I am going to think how deactivate this.
Summary I am having E/AndroidRuntime: FATAL EXCEPTION Caused by: android.view.InflateException Caused by: java.lang.reflect.InvocationTargetException
Expected Behavior This only happen when I am inflating a xml for a PDF . (it is using a background thread). When It inflates the view normally that crash behavior does not happen (it is using the ui thread).
Device (please complete the following information):
Additional Context `E/AndroidRuntime: FATAL EXCEPTION: pool-10-thread-1 Process: com.intecanar.ondiet, PID: 17468 android.view.InflateException: Binary XML file line #7 in com.intecanar.ondiet:layout/pdf_chart: Binary XML file line #7 in com.intecanar.ondiet:layout/pdf_chart: Error inflating class com.github.mikephil.charting.charts.LineChart Caused by: android.view.InflateException: Binary XML file line #7 in com.intecanar.ondiet:layout/pdf_chart: Error inflating class com.github.mikephil.charting.charts.LineChart Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:852) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082) at android.view.LayoutInflater.inflate(LayoutInflater.java:680) at android.view.LayoutInflater.inflate(LayoutInflater.java:532) at android.view.LayoutInflater.inflate(LayoutInflater.java:479)