AndroidRuntime:android.view.InflateException:Binary XML file line #168 occurs when an Android project is deployed: Error inflating class errors

Source: Internet
Author: User

This error also made me struggle for a day, when the project was written on the Android virtual machine is normal, so when I deployed to the Android phone, click the login button to jump to the user's main interface when the direct end of the run back to the login screen. At that time, I carefully examined my own code, and did not find any problem, the error shown on the Logcat is as follows: AndroidRuntime:android.view.InflateException:Binary XML file line #168:  Error inflating class (This is the most important line of information in which an error has been included). So I almost looked at Baidu all about Androidruntime error posts and blogs, but also tried several times, although not in accordance with the method of Baidu successfully solve their own problems, but also let me understand the specific reasons for this error.

At the heart of this error is the binary XML file line #168, which is an error in invoking resource information inside the component or component used in the layout XML file applied in the corresponding activity, Binary XML file Line #  168 means that there is an error in the 168th row of my layout XML file.  I took a closer look at that time. The 168th line in the XML file calls a Imagev Iew component, which I used several in this XML file, but this error has occurred.  Finally, there is no way to change a method, re-create an XML layout file, first add a few components, and then deploy on the phone, click on the login successfully jump to the main page. So I added the original design component to the newly created XML file, and finally the desired effect was reached at the end of the deployment.

From this question, let me understand a truth: the core of the problem is to understand the exact location of the error, and the solution to the wrong is not necessarily in accordance with a given routine to do, sometimes may wish to change the idea, will find the problem is not the problem. Through this error, in improving their own problem-solving awareness, hope can also help more students ~

 

AndroidRuntime:android.view.InflateException:Binary XML file line #168 occurs when an Android project is deployed: Error inflating class errors

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.