Skip to content
Advertisement

How to resolve problem of inflateException when I include a layout?

I design a new form name (form_info.xml) to get some information from user then I tried to include the form to activity_main.xml but unfortunately app crashed and I got inflateExcdeption but I don’t know how to handle it. Also when I add my new form by means of setContentView (R.layout.form_info) I got same error.

JavaScript

There is activity_main.xml:

JavaScript

And below is form_info.xml :

JavaScript

And Logcat is:

JavaScript

Advertisement

Answer

Change your view component to this :

JavaScript

Use View instead of view.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement