Android resource linking failed

Error:Internal error:
org.gradle.tooling.BuildException: Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.1-all.zip'.
	.......

Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
warn: removing resource com.xxx.xxx:array/bespokeAdd_AMPM without required default value.
warn: removing resource com.xxx.xxx:array/socket_times without required default value.
warn: removing resource com.xxx.xxx:string/about_blog without required default value.
warn: removing resource com.xxx.xxx:string/about_official_link without required default value.
warn: removing resource com.xxx.xxx:string/about_public_number without required default value.
warn: removing resource com.xxx.xxx:string/action_ls_robot without required default value.

D:\project\xxx\loginmanager\build\intermediates\packaged_res\debug\layout\a_robot_version.xml:23: AAPT: error: resource string/version_is_new (aka com.xxx.xxx:string/version_is_new) not found.
    
D:\project\xxx\loginmanager\build\intermediates\packaged_res\debug\layout\a_robot_version.xml:39: AAPT: error: resource string/version_old (aka com.xxx.xxx:string/version_old) not found.
    
D:\project\xxx\loginmanager\build\intermediates\packaged_res\debug\layout\a_robot_version.xml:59: AAPT: error: resource string/version_wifi (aka com.xxx.xxx:string/version_wifi) not found.
    
D:\project\xxx\loginmanager\build\intermediates\packaged_res\debug\layout\a_robot_version_state.xml:20: AAPT: error: resource string/version_update_ing2 (aka com.xxx.xxx:string/version_update_ing2) not found.
    
D:\project\xxx\loginmanager\build\intermediates\packaged_res\debug\layout\a_robot_version_state.xml:67: AAPT: error: resource string/version_hint1 (aka com.xxx.xxx:string/version_hint1) not found.

在将Gradle更新到3.3.2之后,在重新编辑打包过程中报如上错误,

其中,removing resource xxx 是删除资源包中没有用到的资源文件或者字段

error信息是因为默认的资源包中缺少对应的资源,比如我的错误,在其他语言的strings.xml文件下有相应的字段,但是在默认的strings.xml缺少对应的文案,只需要将缺少的字段,在默认的文件中添加即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值