Execution failed for task ':app:transformClassesWith___ReClass___ForRelease'.

集成Replugin后,打包Release版本出现错误:'E:workspaceweiduQuestionWDQuestionappuildintermediates ransformsdesugar elease39'不存在。尝试了多种方法未解决问题,寻求帮助。

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

最近集成replugin的使用遇到了一个很坑的问题,打包失败

      [zip] Building zip: E:\workspace\weiduQuestion\WDQuestion\app\build\intermediates\transforms\desugar\release\37.jar
      [zip] Building zip: E:\workspace\weiduQuestion\WDQuestion\app\build\intermediates\transforms\desugar\release\38.jar
:app:transformClassesWith___ReClass___ForRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWith___ReClass___ForRelease'.
> E:\workspace\weiduQuestion\WDQuestion\app\build\intermediates\transforms\desugar\release\39 does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 27s
95 actionable tasks: 12 executed, 83 up-to-date
14:54:09: Task execution finished 'assembleRelease'.

 

一直没解决,求救各位大佬,指教下

Traceback (most recent call last): File "D:\桌面\ultralytics-yolov8-main\test1\blueberry.py", line 4, in <module> a1 = YOLO(&#39;yolov8n.pt&#39;) # 官方提供的基础测试和训练模型 ^^^^^^^^^^^^^^^^^^ File "D:\桌面\ultralytics-yolov8-main\ultralytics\yolo\engine\model.py", line 106, in __init__ self._load(model, task) File "D:\桌面\ultralytics-yolov8-main\ultralytics\yolo\engine\model.py", line 145, in _load self.model, self.ckpt = attempt_load_one_weight(weights) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\桌面\ultralytics-yolov8-main\ultralytics\nn\tasks.py", line 396, in attempt_load_one_weight ckpt, weight = torch_safe_load(weight) # load ckpt ^^^^^^^^^^^^^^^^^^^^^^^ File "D:\桌面\ultralytics-yolov8-main\ultralytics\nn\tasks.py", line 336, in torch_safe_load return torch.load(file, map_location=&#39;cpu&#39;), file # load ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\李佳伟\AppData\Roaming\Python\Python312\site-packages\torch\serialization.py", line 1524, in load raise pickle.UnpicklingError(_get_wo_message(str(e))) from None _pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint. (1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source. (2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message. WeightsUnpickler error: Unsupported global: GLOBAL ultralytics.nn.tasks.DetectionModel was not an allowed global by default. Please use `torch.serialization.add_safe_globals([ultralytics.nn.tasks.DetectionModel])` or the `torch.serialization.safe_globals([ultralytics.nn.tasks.DetectionModel])` context manager to allowlist this global if you trust this class/function. Check the documentation of torch.load to learn more about types accepted by default with weights_only https://pytorch.org/docs/stable/generated/torch.load.html.解释代码
最新发布
05-23
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值