Today, the Project reported the following problem:
Java. lang. runtimeexception: unable to start activity componentinfo {COM. CSII. jincheng/COM. CSII. UI. mainmenuactivity}: Java. lang. runtimeexception: Binary XML file line #1: You must supply a layout_height attribute.
This probably means that no corresponding attribute is added to the XML layout file. I have encountered a similar problem before and think this is not a problem at all, the attribute in XML must have been written or not written, or the attribute is not supported. I will troubleshoot it one by one through the above steps;
Step 1: Check whether there are missing attributes in the layout file corresponding to this class. All attributes are complete. Is there a problem;
Step 2: Check whether the style referenced by the layout file is correct;
Step 3: check if there are any attributes that are not supported. This is too far away and cannot be found;
The problem is that the test machine is not around yet. In the local project team, there is no clue. The more time it gets, the more calm it gets, check the problem again. When the problem occurs, it is a Motorola mobile phone. I don't know the model. All of the above are excluded. Check the layout file corresponding to this category, let's take a look at what attributes are used. I finally found that this file has a fixed width value. I thought it was a problem with adaptation. Finally, I found that the adaptation values did not adapt to the corresponding resolution, in addition, there is no Demin in the default values. XML file, and finally add the corresponding file to solve this problem;
You must supply a layout_width attribute Solution