为 androidx 升级时资源 'attr/visibility' 的重复值
Duplicate value for resource 'attr/visibility' while upgrading for androidx
我正在尝试迁移 androidx,但我遇到了一个无法解决的问题。
Android resource compilation failed
Output: /Users/AndroidStudioProjects/MyApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2497: error: duplicate value for resource 'attr/visibility' with config ''.
/Users/AndroidStudioProjects/MyApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2497: error: resource previously defined here
它说我的代码中某处有一个名为 'visibility' 的属性,但我没有。
现在我应该操纵错误所提到的 values.xml 吗?我觉得不是。
我有一个自定义 attr.xml,其中包含以下内容:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="title_separator_settings">
<attr name="titleText" format="string" localization="suggested" />
<attr name="valueColor" format="color" />
<attr name="lineColor" format="color" />
<attr name="titleSize" format="float" />
</declare-styleable>
希望有人遇到过这种情况,可以帮帮我。
谢谢。
寻找可能具有相同属性的任何库。
我正在尝试迁移 androidx,但我遇到了一个无法解决的问题。
Android resource compilation failed
Output: /Users/AndroidStudioProjects/MyApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2497: error: duplicate value for resource 'attr/visibility' with config ''.
/Users/AndroidStudioProjects/MyApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2497: error: resource previously defined here
它说我的代码中某处有一个名为 'visibility' 的属性,但我没有。
现在我应该操纵错误所提到的 values.xml 吗?我觉得不是。
我有一个自定义 attr.xml,其中包含以下内容:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="title_separator_settings">
<attr name="titleText" format="string" localization="suggested" />
<attr name="valueColor" format="color" />
<attr name="lineColor" format="color" />
<attr name="titleSize" format="float" />
</declare-styleable>
希望有人遇到过这种情况,可以帮帮我。
谢谢。
寻找可能具有相同属性的任何库。