1. Download our Official Android App: Forums for Android!

Apps android rendering error Binary XML file line #-1: Error inflating class unknown

Discussion in 'Android Development' started by Android Question, May 8, 2016.

  1. Android Question

    Thread Starter
    Rank:
    None
    Posts:
    0
    Joined:

    i have problem in my android project when i trying to add calendar view or date picker there is Rendering problem message appear

    Message: " Rendering problems Exception raised during rendering : Binary XML file line #-1: Error inflating class unknown> "

    and this is the message details

    Code (Text):
    1. java.lang.NoSuchFieldError: this$0
    2. at android.view.ViewRootImpl$RunQueue.postDelayed(ViewRootImpl.java:6872)
    3. at android.view.View.postDelayed(View.java:13008)
    4. at android.widget.CalendarViewLegacyDelegate$ScrollStateRunnable.doScrollStateChange(CalendarViewLegacyDelegate.java:956)
    5. at android.widget.CalendarViewLegacyDelegate.onScrollStateChanged(CalendarViewLegacyDelegate.java:829)
    6. at android.widget.CalendarViewLegacyDelegate.goTo(CalendarViewLegacyDelegate.java:816)
    7. at android.widget.CalendarViewLegacyDelegate.<init>(CalendarViewLegacyDelegate.java:334)
    8. at android.widget.CalendarView.<init>(CalendarView.java:105)
    9. at android.widget.CalendarView.<init>(CalendarView.java:92)
    10. at android.widget.CalendarView.<init>(CalendarView.java:88)
    11. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    12. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    13. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    14. at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    15. at android.view.LayoutInflater.createView(LayoutInflater.java:619)
    16. at android.view.BridgeInflater.onCreateView(BridgeInflater.java:107)
    17. at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
    18. at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
    19. at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:149)
    20. at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
    21. at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)
    22. at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
    23. at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
    24. at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    25. at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
    26. at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
    27. at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
    28. at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    29. at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
    30. at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
    31. at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
    32. at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    33. at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838)
    34. at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
    35. at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
    36. at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    37. at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
    38. at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
    39. at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:229)
    40. at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426)
    41. at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350)
    42. at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:520)
    43. at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:508)
    44. at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:967)
    45. at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:508)
    46. at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:75)
    47. at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:620)
    48. at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:617)
    49. at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:371)
    50. at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:617)
    51. at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:639)
    52. at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$7.run(AndroidDesignerEditorPanel.java:519)
    53. at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337)
    54. at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327)
    55. at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271)
    56. at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286)
    57. at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244)
    58. at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234)
    59. at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
    60. at com.intellij.util.Alarm$Request$1.run(Alarm.java:352)
    61. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    62. at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    63. at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    64. at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    65. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    66. at java.lang.Thread.run(Thread.java:695)

    and this is my layout xml file


    Code (Text):
    1.  <?xml version="1.0" encoding="UTF-8"?>
    2. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    3. xmlns:tools="http://schemas.android.com/tools"
    4. android:layout_width="match_parent"
    5. android:layout_height="match_parent"
    6. tools:context="com.laguses.callsrecorder.callsrecorderapp.Records">
    7.  
    8.  
    9. <LinearLayout
    10.     android:orientation="vertical"
    11.     android:layout_width="match_parent"
    12.     android:layout_height="match_parent">
    13.  
    14.     <LinearLayout
    15.         android:orientation="horizontal"
    16.         android:layout_width="fill_parent"
    17.         android:layout_height="wrap_content"
    18.         android:background="@color/backgroundcolor"
    19.         android:paddingTop="20dp"
    20.         android:paddingBottom="20dp"
    21.         android:paddingLeft="15dp"
    22.         android:paddingRight="15dp"
    23.         android:gravity="center">
    24.  
    25.         <LinearLayout
    26.             android:orientation="horizontal"
    27.             android:layout_width="wrap_content"
    28.             android:layout_height="wrap_content">
    29.  
    30.             <ImageView
    31.                 android:layout_width="wrap_content"
    32.                 android:layout_height="wrap_content"
    33.                 android:id="@+id/imageView26"
    34.                 android:src="@mipmap/records_showfilter_icn" />
    35.         </LinearLayout>
    36.  
    37.         <LinearLayout
    38.             android:orientation="horizontal"
    39.             android:layout_width="wrap_content"
    40.             android:layout_height="wrap_content" >
    41.  
    42.             <ImageView
    43.                 android:layout_width="wrap_content"
    44.                 android:layout_height="wrap_content"
    45.                 android:id="@+id/imageView27"
    46.                 android:src="@mipmap/records_hidefilter_icn" />
    47.         </LinearLayout>
    48.  
    49.         <LinearLayout
    50.             android:orientation="horizontal"
    51.             android:layout_width="fill_parent"
    52.             android:layout_height="wrap_content"
    53.             android:gravity="right">
    54.  
    55.             <LinearLayout
    56.                 android:orientation="horizontal"
    57.                 android:layout_width="wrap_content"
    58.                 android:layout_height="wrap_content"
    59.                 android:gravity="center">
    60.  
    61.                 <EditText
    62.                     android:layout_width="112dp"
    63.                     android:layout_height="wrap_content"
    64.                     android:id="@+id/editText"
    65.                     android:singleLine="true"
    66.                     android:textColor="#ffffff"
    67.                     android:background="@drawable/search_field_borderstyle" />
    68.  
    69.                 <ImageView
    70.                     android:layout_width="wrap_content"
    71.                     android:layout_height="wrap_content"
    72.                     android:id="@+id/imageView25"
    73.                     android:src="@mipmap/records_search_icn"
    74.                     android:layout_marginLeft="10dp" />
    75.             </LinearLayout>
    76.         </LinearLayout>
    77.  
    78.     </LinearLayout>
    79.  
    80.     <LinearLayout
    81.         android:orientation="vertical"
    82.         android:layout_width="match_parent"
    83.         android:layout_height="match_parent"
    84.         android:padding="20dp"
    85.         android:background="@color/backgroundcolor">
    86.  
    87.         <LinearLayout
    88.             android:orientation="horizontal"
    89.             android:layout_width="match_parent"
    90.             android:layout_height="match_parent"
    91.             android:background="@drawable/filtergroupshape">
    92.  
    93.             <LinearLayout
    94.                 android:orientation="vertical"
    95.                 android:layout_width="wrap_content"
    96.                 android:layout_height="wrap_content">
    97.  
    98.                 <CheckBox
    99.                     android:layout_width="wrap_content"
    100.                     android:layout_height="wrap_content"
    101.                     android:text="Incoming Calls"
    102.                     android:id="@+id/checkBox"
    103.                     android:checked="false" />
    104.  
    105.                 <CheckBox
    106.                     android:layout_width="wrap_content"
    107.                     android:layout_height="wrap_content"
    108.                     android:text="Outgoing Calls"
    109.                     android:id="@+id/checkBox2"
    110.                     android:checked="false" />
    111.  
    112.                 <CheckBox
    113.                     android:layout_width="wrap_content"
    114.                     android:layout_height="wrap_content"
    115.                     android:text="Missed Calls"
    116.                     android:id="@+id/checkBox3"
    117.                     android:checked="false" />
    118.  
    119.                 <CheckBox
    120.                     android:layout_width="wrap_content"
    121.                     android:layout_height="wrap_content"
    122.                     android:text="Fails Calls"
    123.                     android:id="@+id/checkBox4"
    124.                     android:checked="false" />
    125.  
    126.                 <CheckBox
    127.                     android:layout_width="wrap_content"
    128.                     android:layout_height="wrap_content"
    129.                     android:text="Favorite Calls"
    130.                     android:id="@+id/checkBox5"
    131.                     android:checked="false" />
    132.             </LinearLayout>
    133.  
    134.             <CalendarView
    135.                 android:layout_width="match_parent"
    136.                 android:layout_height="match_parent"
    137.                 android:id="@+id/calendarView"
    138.                 android:layout_gravity="center_vertical" />
    139.  
    140.         </LinearLayout>
    141.     </LinearLayout>
    142.  
    143. </LinearLayout>

    finally i noticed that error appear only when i'm trying to add calendar view or date picker
     

    Advertisement

  2. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,293
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,293
    23,649
    2,138
    Male
    space alien ;)
    Indy
    Welcome to our AndroidForums--I've moved your thread to our application development area for you.

    Cheers!
     
  3. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,325
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,325
    10,463
    1,988
    Male
    Software developer
    South West of England
    That is very odd. Never seen that one before, but looks like some sort of library version/dependency issue.
    Have you tried a clean build?
    What's in your Gradle build file?
     
Tags:

Share This Page

Loading...