Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joshcomley opened this issue Jan 31, 2024 · 4 comments
Open

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

joshcomley opened this issue Jan 31, 2024 · 4 comments

Comments

@joshcomley
Copy link

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!

@FerhatKoca
Copy link

Having the same issue

@henrychavez
Copy link

Same here but the workaround works!

@pavliczandris
Copy link

Which java version are you using? For me, the problem was resolved by updating to JDK 17 from JDK 11

@jokkopp
Copy link

jokkopp commented Mar 21, 2024

Same over here too but the 6.0.0 works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants