Android 资源报错:has no declaration in the base values folder; this can lead to crashes when the resourc

background:

When we adapt to different resolutions, we often set different resolutions for some sizes

When we are dealing with dimen, we find errors, or other resources

The dimen "fxdimen_px_800" in values-sw393dp has no declaration in the base values folder; this can lead to crashes when the resource is queried in a configuration that does not match this qualifier

 reason:

It is because we have a default, and the definition of the resource is not found in the default values, that is to say, the values ​​are the basic data, and the others are extended data. If the basic data does not exist and other resolutions appear, the resource will be reported Resource exception occurred.

If we point to something other than the adaptation base and others, we only need to define one that is exactly the same as the base values ​​at the corresponding resolution. The system gives priority to finding resources under the specified resolution, and if not found, it will find resources of the basic data.

Guess you like

Origin blog.csdn.net/qq36246172/article/details/120883681