At Android. content. res. typearray. getdimensionpixelsize (typearray. Java: 463)
This error is encountered today when the project is adapted to run the project. The cause and solution of the error are as follows:
Cause:This error occurs because XXX is not defined in the dimen file when @ dimen/XXX is used to obtain the value.
Cause of recurrence of Project bugs: The dimen values required for an XML file are also divided into three due to the need to adapt to the three sets of devices,
For example,. the XML file in the Setting Height = "@ dimen/a_height", on a device with the dimen in the values-sw540dp file. XML, and there is no project named a_height in the dimen file, although there are dimen files in the other two folders.
A little too long,To put it bluntly, this error occurs when @ dimen/XXX is used to obtain the value, and XXX is not defined in the dimen file.. So this problem occurs, especially when it comes to adaptation processing. Check which folder of the current device contains dimen. xml and perform corresponding processing.