Problem description
Crash and error reporting in smartwatch applications: ElementScatterException: radius can only set in rectangle.
Solution
When referencing a graphic resource XML file, there is an error in the XML syntax.Specifically, when writing ohos:shape="oval", the corners attribute was incorrectly added.
When ohos:shape="oval", the corners attribute should not be present.
<?xml version="1.0" encoding="UTF-8" ?>
<shape xmlns:ohos="http://schemas.huawei.com/res/ohos"
ohos:shape="oval">
<bounds
ohos:top="0"
ohos:left="0"
ohos:right="16px"
ohos:bottom="16px"/>
<solid
ohos:color="#FFFFFF"/>
</shape>
Applicable Scenarios
Smartwatch applications utilizing the shape XML resources, specifically for oval shapes.
Top comments (0)