title: InvocationTargetException on inflating an xml - android
body: <p>I have a code that works 99% of the time since is deploy in lots of clients, but sometimes I get the following:</p>
  
  <blockquote>
    <p>java.lang.reflect.InvocationTargetException
      android.widget.LinearLayout.(LinearLayout.java:92)
        java.lang.reflect.Constructor.constructNative(Native Method)
        java.lang.reflect.Constructor.newInstance(Constructor.java:446)
        android.view.LayoutInflater.createView(LayoutInflater.java:499)
        com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
        android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
        android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
        android.view.LayoutInflater.inflate(LayoutInflater.java:407)
        android.view.LayoutInflater.inflate(LayoutInflater.java:320)
        com.mycode.mycode.MyClass.draw(xxxxxxx)
    .....</p>
  </blockquote>
  
  <p>and on my code I have:</p>
  
  <blockquote>
    <p>LayoutInflater li = (LayoutInflater) this
                        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);<br>
                theview = li.inflate(R.layout.partofthescreen,
                        somecontainer, false);</p>
  </blockquote>
  
  <p>so the question is why I am getting InvocationTargetException.</p>
  
  <p>Thanks</p>