Android 编译时出现Android resource linking failed.without required default value.

错误信息如下:

复制代码
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > Android resource linking failed
     warn: removing resource ***:string/*** without required default value.
     warn: removing resource ***:string/*** without required default value.
     **\app\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:14: error: resource ** (aka package:string/**) not found.
     error: failed processing manifest.

问题原因:国际化中的资源没有添加默认资源导致的。

解决办法:

1、如果是String字符串的在values/strings.xml中添加缺失默认的即可。

2、如果是图片资源需要在drawable下添加对应缺失默认的资源。

相关推荐
onthewaying1 小时前
Android SurfaceTexture 深度解析
android·opengl
茄子凉心1 小时前
Android Bluetooth 蓝牙通信
android·蓝牙通信·bluetooth通信
00后程序员张2 小时前
iOS 26 App 运行状况全面解析 多工具协同监控与调试实战指南
android·ios·小程序·https·uni-app·iphone·webview
2501_916007473 小时前
iOS 混淆实战,多工具组合完成 IPA 混淆、加固与发布治理(iOS混淆|IPA加固|无源码混淆|App 防反编译)
android·ios·小程序·https·uni-app·iphone·webview
2501_915918413 小时前
怎么上架 App?iOS 应用上架完整流程详解与跨平台发布实战指南
android·ios·小程序·https·uni-app·iphone·webview
2501_929157683 小时前
【安卓+PC+IOS】psp全中文游戏+高清纹理包+金手指
android·游戏·ios
2501_916008893 小时前
iOS 混淆工具链实战 多工具组合完成 IPA 混淆与加固(iOS混淆|IPA加固|无源码加固|App 防反编译)
android·ios·小程序·https·uni-app·iphone·webview
yinghuaqipao3 小时前
面向对象——设计模式(创建型)
android·java·设计模式
用户41659673693554 小时前
Android 性能调优与故障排查:ADB 诊断命令终极指南
android
沐怡旸4 小时前
【底层机制】【Android】本地Socket 对比 Binder 以及在 Android系统中的应用
android·面试