java.lang.RuntimeException: Unable to start activity ComponentInfo{yichun.myapplication/yichun.myapplication.MainActivity}: android.view.InflateException: Binary XML file line #20: Error inflating class EditText

Stack Overflow | jackykuo | 10 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Android Error inflating class EditText

    Stack Overflow | 10 months ago | jackykuo
    java.lang.RuntimeException: Unable to start activity ComponentInfo{yichun.myapplication/yichun.myapplication.MainActivity}: android.view.InflateException: Binary XML file line #20: Error inflating class EditText
  2. 0

    How to set the size of vector drawable as drawableLeft drawable?

    Stack Overflow | 8 months ago | Shanuka
    android.view.InflateException: Binary XML file line #52: Error inflating class EditText

    Root Cause Analysis

    1. org.xmlpull.v1.XmlPullParserException

      Binary XML file line #24: <nine-patch> requires a valid 9-patch source image

      at android.graphics.drawable.NinePatchDrawable.updateStateFromTypedArray()
    2. Android Platform
      EditText.<init>
      1. android.graphics.drawable.NinePatchDrawable.updateStateFromTypedArray(NinePatchDrawable.java:445)
      2. android.graphics.drawable.NinePatchDrawable.inflate(NinePatchDrawable.java:401)
      3. android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1095)
      4. android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:185)
      5. android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1095)
      6. android.graphics.drawable.InsetDrawable.inflate(InsetDrawable.java:104)
      7. android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1095)
      8. android.graphics.drawable.Drawable.createFromXml(Drawable.java:1017)
      9. android.content.res.Resources.loadDrawableForCookie(Resources.java:2418)
      10. android.content.res.Resources.loadDrawable(Resources.java:2330)
      11. android.content.res.TypedArray.getDrawable(TypedArray.java:749)
      12. android.view.View.<init>(View.java:3730)
      13. android.widget.TextView.<init>(TextView.java:634)
      14. android.widget.EditText.<init>(EditText.java:65)
      15. android.widget.EditText.<init>(EditText.java:61)
      15 frames
    3. Android v7
      AppCompatDelegateImplV7.onCreateView
      1. android.support.v7.widget.AppCompatEditText.<init>(AppCompatEditText.java:60)
      2. android.support.v7.widget.AppCompatEditText.<init>(AppCompatEditText.java:56)
      3. android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:112)
      4. android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:980)
      5. android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:1039)
      5 frames
    4. Android Support v4
      LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView
      1. android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
      1 frame
    5. Android Platform
      LayoutInflater.inflate
      1. android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:725)
      2. android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
      3. android.view.LayoutInflater.inflate(LayoutInflater.java:504)
      4. android.view.LayoutInflater.inflate(LayoutInflater.java:414)
      5. android.view.LayoutInflater.inflate(LayoutInflater.java:365)
      5 frames
    6. Android v7
      AppCompatActivity.setContentView
      1. android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
      2. android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
      2 frames
    7. yichun.myapplication
      MainActivity.onCreate
      1. yichun.myapplication.MainActivity.onCreate(MainActivity.java:11)
      1 frame
    8. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:5937)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
      5. android.app.ActivityThread.access$800(ActivityThread.java:144)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
      7. android.os.Handler.dispatchMessage(Handler.java:102)
      8. android.os.Looper.loop(Looper.java:135)
      9. android.app.ActivityThread.main(ActivityThread.java:5221)
      9 frames
    9. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    10. Android
      ZygoteInit$MethodAndArgsCaller.run
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
      1 frame