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

未關閉
#567 4 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
android, typescript

研究方向

在 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 內容生成。

描述

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!

主要語言
TypeScript
星號
206
分支
123
平均合併
2 天 1 小時
30 天內合併 PR
1

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

NativeScript/plugins 的其他 Issue

查看 NativeScript/plugins 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。