java.lang.RuntimeException

Unable to start activity ComponentInfo{com.stefan.example/com.stefan.example.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class com.stefan.example.MainActivity.CustomButton

Samebug tips1

You need to setup a GlideModule before use Glide.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web2751

  • via Stack Overflow by Michael
    ,
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.stefan.example/com.stefan.example.MainActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class com.stefan.example.MainActivity.CustomButton at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2306) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2366) at android.app.ActivityThread.access$800(ActivityThread.java:149) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5297) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) Caused by: android.view.InflateException: Binary XML file line #12: Error inflating class com.stefan.example.MainActivity.CustomButton at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:757) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.stefan.example.MainActivity.onCreate(MainActivity.java:30) at android.app.Activity.performCreate(Activity.java:6020) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2259) ... 10 more Caused by: java.lang.ClassNotFoundException: Didn't find class "com.stefan.example.MainActivity.CustomButton" on path: DexPathList[[zip file "/data/app/com.stefan.example-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.view.LayoutInflater.createView(LayoutInflater.java:571) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) ... 20 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Agócs TamásAgócs Tamás
    39 times, last one
    brunosatrianibrunosatriani
    43 times, last one
    Unknown visitor
    Unknown visitorOnce,
    ben.slama.jihedben.slama.jihed
    6 times, last one
    Saravana Kumar ChinnarajSaravana Kumar Chinnaraj
    4 times, last one
    158 more bugmates