Android.view.InflateException:Binary XML file Line #95: The Error inflating class (out of memory).
In fact, because the out of memory, resulting in XML is not possible to be inflated successfully, so the activity of the OnCreate method,
Setcontentview (r.layout.***) is not likely to be successfully invoked.
He appeared in I have multiple instructional animations, and the animated animation that is based on the Imageview,imageview background is a large picture of our project.
The error situation is: Open an activity, the activity is only used to play an animation. Then manually back, turn off activity (finish). Second activity, the second activity bound layout is different from the first one, and another animation is played. Manually back, turn off activity.
And so on, the android.view.InflateException:Binary XML file line #95 will appear after multiple runs: Error inflating class.
caused by out of memory.
At first I did not want to understand, every time my activity is finish, how can not memory.
So the Internet to find the answer, on the dear StackOverflow found the great God of the comments, (the Great god please: http://stackoverflow.com/questions/7536988/ android-app-out-of-memory-issues-tried-everything-and-still-at-a-loss/7576275), originally raised the question the everything, haha.
In fact, because we do not recycle resources manually, in other words, Java garbage collection mechanism is not so smart, we finish off, but the relevant resources in it may not be recycled. It's possible that he thinks he's smart enough to stay and wait for our next use. So we need to manually release large resources such as ImageView in the OnStop method.
Android.view.InflateException:Binary XML file Line #95: The Error inflating class (out of memory). Abnormal