NativeScript / NativeScript/plugins

Build failure for latest @nativescript/background-http v6.0.1

未关闭
#567 4 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
206
派生
123
平均合并
2 天 1 小时
30 天内合并 PR
1

描述

When updating to the latest version of background-http I am receiving the following build error:

D:\code\SafeSite\mobile\code\apps\nativescript-safesite\platforms\android\app\src\main\java\com\tns\gen\net\gotev\uploadservice\observer\request\RequestObserverDelegate.java:10: error: cannot access RequestObserverDelegate
        net.gotev.uploadservice.observer.request.RequestObserverDelegate {
                                                ^
  bad class file: C:\Users\joshc\.gradle\caches\transforms-3\6c21abdd05e63a95e1d98494741b42e0\transformed\jetified-uploadservice-4.9.2-api.jar(/net/gotev/uploadservice/observer/request/RequestObserverDelegate.class)
    class file has wrong version 61.0, should be 55.0       
    Please remove or make sure it appears in the correct subdirectory of the classpath.
D:\code\SafeSite\mobile\code\apps\nativescript-safesite\platforms\android\app\src\main\java\com\tns\gen\net\gotev\uploadservice\observer\request\RequestObserverDelegate.java:17: error: cannot access UploadInfo
      android.content.Context param_0, net.gotev.uploadservice.data.UploadInfo param_1) {
                                                            
       ^
  bad class file: C:\Users\joshc\.gradle\caches\transforms-3\6c21abdd05e63a95e1d98494741b42e0\transformed\jetified-uploadservice-4.9.2-api.jar(/net/gotev/uploadservice/data/UploadInfo.class)
    class file has wrong version 61.0, should be 55.0       
    Please remove or make sure it appears in the correct subdirectory of the classpath.
D:\code\SafeSite\mobile\code\apps\nativescript-safesite\platforms\android\app\src\main\java\com\tns\gen\net\gotev\uploadservice\observer\request\RequestObserverDelegate.java:27: error: cannot access ServerResponse
      net.gotev.uploadservice.network.ServerResponse param_2) {
                                     ^
  bad class file: C:\Users\joshc\.gradle\caches\transforms-3\6c21abdd05e63a95e1d98494741b42e0\transformed\jetified-uploadservice-4.9.2-api.jar(/net/gotev/uploadservice/network/ServerResponse.class)
    class file has wrong version 61.0, should be 55.0       
    Please remove or make sure it appears in the correct subdirectory of the classpath.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors

I can work around this by forcing the uploadServiceVersion to 4.7.0 in before-plugins.gradle:

uploadServiceVersion = "4.7.0"

I am using latest NativeScript v8.6.5 on an Angular project.

To trigger the error, simple use the service in a project created by the latest version of NativeScript.

Thanks!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在 NativeScript 8.6.5 Angular 项目中使用 @nativescript/background-http v6.0.1 重现失败,并检查 before-plugins.gradle,包括 uploadServiceVersion 设置。将失败的 uploadservice 4.9.2 依赖项与报告的 4.7.0 workaround 进行比较;当最新插件能够在没有 class-file version errors 的情况下构建时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, typescript
领域
build-system, mobile-dev
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。