NativeScript / NativeScript/plugins
Build failure for latest @nativescript/background-http v6.0.1
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 123
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 1
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with @nativescript/background-http v6.0.1 in a NativeScript 8.6.5 Angular project and inspect before-plugins.gradle, including the uploadServiceVersion setting. Compare the failing uploadservice 4.9.2 dependency with the reported 4.7.0 workaround; done means the latest plugin builds without the class-file version errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, typescript
- Domain
- build-system, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100