我现在正在将Eclipse项目迁移到Android Studio.当我构建项目时,我得到以下错误gradle.
\...\res\values\strings.xml
>"Error: Unsupported type 'add-resource'"
Run Code Online (Sandbox Code Playgroud)
问题strings.xml在于:
<add-resource type="string" name="default_folder_name" />
Run Code Online (Sandbox Code Playgroud)
我怎么解决这个问题?
提前致谢.
<add-resources> 是一个平台唯一的功能.
在aapt中使用叠加时会使用add-resource(除非你使用add-resource,否则它会抱怨覆盖值),而我们会在合并中自动启用覆盖.替换它
<item ...>应该工作.~ Xavier Ducrohet
而不是这个,
<add-resource type="string" name="default_folder_name" />
Run Code Online (Sandbox Code Playgroud)
用这个,
<string name="default_folder_name"/>
Run Code Online (Sandbox Code Playgroud)
而且,而不是这个,
<add-resource type="dimen" name="custom_cling_margin_top" />
<add-resource type="dimen" name="custom_cling_margin_right" />
<add-resource type="dimen" name="custom_cling_margin_left" />
Run Code Online (Sandbox Code Playgroud)
用这个,
<dimen name="custom_cling_margin_top"/>
<dimen name="custom_cling_margin_right"/>
<dimen name="custom_cling_margin_left"/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7107 次 |
| 最近记录: |