I updated to API 33 and now there is an error in the designer " unexpected resource type 'dimen' expected: string ". This error does not affect anything, but I would like to remove it.
This error appeared when I changed compileSdkVersion
and targetSdkVersion
in build.gradle
from version 32
to version 33
. ( minSdkVersion
uses version 24
).
Resource file:
<resources>
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
dimen
to string
and it worked, but obviously it shouldn't be that type as Android Studio requests localization for other languages.Today there was an update for Android Studio and this bug has been fixed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.