使用android-resource-remover遇到的问题

在尝试使用android-resource-remover时遇到了报错,但通过改变使用方法,特别是指定使用lint,成功地避免了错误并完成了资源移除操作。

直接使用会报错:


C:\Users\Administrator\Desktop\GitHub\android-resource-remover-master\test\android_app>lint --check UnusedResources  ./ --xml lint-result.xml && android-resource-remover

Scanning android_app: ................
Scanning android_app (Phase 2): ...........
Wrote XML report to C:\Users\Administrator\Desktop\GitHub\android-resource-remov
er-master\test\android_app\lint-result.xml
Lint found 1 errors and 12 warnings
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\android-resource-remover.exe\__main__.py", line 9, i
n <module>
  File "c:\python27\lib\site-packages\android_clean_app.py", line 141, in main
    lint_result_path, app_dir, ignore_layouts = run_lint_command()
  File "c:\python27\lib\site-packages\android_clean_app.py", line 77, in run_lin
t_command
    call_result = subprocess.call([lint, app_dir, '--xml', lint_result])
  File "c:\python27\lib\subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "c:\python27\lib\subprocess.py", line 710, in __init__
    errread, errwrite)
  File "c:\python27\lib\subprocess.py", line 958, in _execute_child
    startupinfo)
WindowsError: [Error 2]

应该换种使用方式,指定lint:


android-resource-remover --lint D:\DevUtils\Android\SDK\tools\lint.bat --xml lint-result.xml

这样就使用成功了:

C:\Users\Administrator\Desktop\GitHub\android-resource-remover-master\test\andro
id_app>android-resource-remover --lint D:\DevUtils\Android\SDK\tools\lint.bat --
xml lint-result.xml
removing resource: .\res\anim\anim_missing.xml
removing resource: .\res\animator\animator_missing.xml
removing resource: .\res\color\color_missing.xml
removing ('dimen', 'missing_dimen') from resource .\res\values\dimens.xml
removing resource: .\res\drawable\drawable_missing.xml
removing resource: .\res\drawable-hdpi\ic_launcher.png
removing resource: .\res\drawable-ldpi\ic_launcher.png
removing resource: .\res\drawable-mdpi\ic_launcher.png
removing resource: .\res\drawable-xhdpi\ic_launcher.png
removing resource: .\res\layout\layout_missing.xml
removing resource: .\res\menu\menu_missing.xml
removing ('string', 'missing') from resource .\res\values\strings.xml
removing ('string', 'missing') from resource .\res\values-fr\strings.xml
removing ('string', 'extra_translation') from resource .\res\values-fr\strings.x
ml
removing resource: .\res\xml\xml_missing.xml
数据集介绍:无人机高空视角行人实例分割数据集 一、基础信息 数据集名称:无人机高空视角行人实例分割数据集 图片数量: - 训练集:3,160张 - 验证集:309张 - 测试集:150张 - 总计:3,619张高空俯拍图片 分类类别: - Person(行人):涵盖多种姿态、密度及复杂背景下的行人目标,适用于高空视角下的精准识别 标注格式: YOLO格式,包含实例分割多边形坐标及类别标签,支持复杂场景下的行人轮廓精确标注 数据特性: - 数据来源:无人机及高空视角采集,覆盖多样化的拍摄高度和光照条件 - 场景特点:包含城市街道、广场、交通枢纽等典型高空监控场景 二、适用场景 无人机安防监控系统开发: 为无人机巡检、人群流量监测等应用提供训练数据,支持开发实时行人检测与计数系统 智慧城市管理: 适用于城市公共空间的人群密度分析、突发事件监测等城市治理场景的算法训练 自动驾驶感知增强: 提升无人机/无人车对地面行人的识别能力,特别是在高空俯视视角下的目标定位精度 计算机视觉研究: 为实例分割算法在复杂背景、小目标检测等前沿课题提供高质量研究数据 三、数据集优势 多维度标注价值: - 专为高空视角优化的标注方案,有效解决小目标识别难题 - 密集人群场景下的实例分割标注,支持重叠目标区分 场景覆盖全面: - 包含不同时段(白天/黄昏)、天气(晴天/多云)的采集数据 - 多种拍摄高度(50-300米)模拟真实无人机工作范围 技术适配性强: - 兼容YOLOv5/v7/v8等主流检测框架 - 标注数据可直接用于实例分割、目标检测双任务训练 实战验证价值: - 已成功应用于智慧园区人流统计系统开发 - 支持开发高空视角下的行人轨迹分析模块
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值