Android 5.1 framework添加资源 问题

Android 码拜 8年前 (2016-05-02) 947次浏览
如题,在android 5.1 的framework 中添加添加 资源文件编译会报错,在public.xml   symbol.xml 中声明都尝试过,也试过make update-api 命令都不行。哪位有可行的解决方法?
out/target/common/obj/PACKAGING/framework_res_id_api.txt:5878: error 17: Field com.android.internal.R.string.system_error_wipe_data has changed value from 17041053 to 17041056
out/target/common/obj/PACKAGING/framework_res_id_api.txt:5884: error 17: Field com.android.internal.R.string.throttle_warning_notification_message has changed value from 17041077 to 17041080
out/target/common/obj/PACKAGING/framework_res_id_api.txt:5885: error 17: Field com.android.internal.R.string.throttle_warning_notification_title has changed value from 17041076 to 17041079
out/target/common/obj/PACKAGING/framework_res_id_api.txt:5886: error 17: Field com.android.internal.R.string.throttled_notification_message has changed value from 17041079 to 17041082
out/target/common/obj/PACKAGING/framework_res_id_api.txt:5887: error 17: Field com.android.internal.R.string.throttled_notification_title has changed value from 17041078 to 17041081
out/target/common/obj/PACKAGING/framework_res_id_api.txt:5926: error 17: Field com.android.internal.R.string.use_physical_keyboard has changed value from 17041075 to 17041078
out/target/common/obj/PACKAGING/framework_res_id_api.txt:5986: error 17: Field com.android.internal.R.string.zen_mode_next_alarm_line_one has changed value from 17041051 to 17041054
out/target/common/obj/PACKAGING/framework_res_id_api.txt:5987: error 17: Field com.android.internal.R.string.zen_mode_next_alarm_summary has changed value from 17041050 to 17041053
******************************
You have tried to change Android framework-res resource ID. Please fix the errors listed above by
restoring the changes.
******************************
解决方案

10

本人怀疑你在public中声明的ID是不是冲突了,还有就是你在res目录下编译了没

10

alps/vendor/mediatek/proprietary/frameworks/api/framework_res_id/1.txt  得更新这个

10

黑科技是把冲突的id,在out生成的目录下copy到alps/vendor/mediatek/proprietary/frameworks/api/framework_res_id/1.txt中,亲测可行,但是是临时解决方案

10

copy到alps/vendor/mediatek/proprietary/frameworks/api/framework_res_id/1.txt 找到最大的那个id号然后再public.xml添加

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Android 5.1 framework添加资源 问题
喜欢 (0)
[1034331897@qq.com]
分享 (0)