android打包时***is not translated in zh错误

本文详细介绍了如何解决Android项目中strings.xml等资源文件未翻译成中文的问题,通过调整Eclipse中Android Lint preferences的设置,将'Missing Translate'键设置为警告级别,从而有效避免该类错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

现象描述:

android项目,使用eclipse打apk包时,报错:

strings.xml等资源文件***is not translated in zh


解决方法:

项目树选中鼠标右键 - Properties - Android Lint preferences - MissingTranslate 键值改为warning.

/** * flatview_do_translate - translate an address in FlatView * * @fv: the flat view that we want to translate on * @addr: the address to be translated in above address space * @xlat: the translated address offset within memory region. It * cannot be @NULL. * @plen_out: valid read/write length of the translated address. It * can be @NULL when we don't care about it. * @page_mask_out: page mask for the translated address. This * should only be meaningful for IOMMU translated * addresses, since there may be huge pages that this bit * would tell. It can be @NULL if we don't care about it. * @is_write: whether the translation operation is for write * @is_mmio: whether this can be MMIO, set true if it can * @target_as: the address space targeted by the IOMMU * @attrs: memory transaction attributes * * This function is called from RCU critical section */ static MemoryRegionSection flatview_do_translate(FlatView *fv, hwaddr addr, hwaddr *xlat, hwaddr *plen_out, hwaddr *page_mask_out, bool is_write, bool is_mmio, AddressSpace **target_as, MemTxAttrs attrs) { MemoryRegionSection *section; IOMMUMemoryRegion *iommu_mr; hwaddr plen = (hwaddr)(-1); if (!plen_out) { plen_out = &plen; } section = address_space_translate_internal( flatview_to_dispatch(fv), addr, xlat, plen_out, is_mmio); iommu_mr = memory_region_get_iommu(section->mr); if (unlikely(iommu_mr)) { return address_space_translate_iommu(iommu_mr, xlat, plen_out, page_mask_out, is_write, is_mmio, target_as, attrs); } if (page_mask_out) { /* Not behind an IOMMU, use default page size. */ *page_mask_out = ~TARGET_PAGE_MASK; } return *section; }
03-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值