android.view.InflateException

Binary XML file line #7: Error inflating class android.widget.ImageView

Samebug tips4

Try adding these lines to your manifest: "android:hardwareAccelerated="false"" and "android:largeHeap="true"" as it seems to work for some cases. See also this article about handling bitmaps on android's documentation: https://goo.gl/8LVrzp


rafaelrafael

Try adding these lines to your manifest: "android:hardwareAccelerated="false"" and "android:largeHeap="true"" as it seems to work for some cases. See also this article about handling bitmaps on android's documentation: https://goo.gl/8LVrzp


rafaelrafael

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

Solutions on the web679

Stack trace

  • android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.ImageView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2303) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363) at android.app.ActivityThread.access$800(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5234) 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:909) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.ImageView at android.view.LayoutInflater.createView(LayoutInflater.java:637) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:686) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:745) at android.view.LayoutInflater.rInflate(LayoutInflater.java:810) at android.view.LayoutInflater.inflate(LayoutInflater.java:508) at android.view.LayoutInflater.inflate(LayoutInflater.java:418) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377) at android.app.Activity.setContentView(Activity.java:2159) at com.daniel.pencarikakus.SplashScreen.onCreate(SplashScreen.java:22) at android.app.Activity.performCreate(Activity.java:5982) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256) ... 10 more Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:611) ... 23 more Caused by: java.lang.OutOfMemoryError: Failed to allocate a 154050816 byte allocation with 12669460 free bytes and 109MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:613) at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:446) at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:973) at android.content.res.Resources.createFromResourceStream(Resources.java:2762) at android.content.res.Resources.loadDrawableForCookie(Resources.java:2463) at android.content.res.Resources.loadDrawable(Resources.java:2365) at android.content.res.MiuiResources.loadDrawable(MiuiResources.java:393) at android.content.res.TypedArray.getDrawable(TypedArray.java:751) at android.widget.ImageView.<init>(ImageView.java:146) at android.widget.ImageView.<init>(ImageView.java:135) at android.widget.ImageView.<init>(ImageView.java:131) ... 26 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

Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
bayukresnobayukresno
Once,
sagarsagar
Once,
Unknown visitor
Unknown visitorOnce,
73 more bugmates