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

Execution failed for task ':capacitor-nodejs:compileDebugJavaWithJavac'. > error: invalid source release: 17 #24

Closed
surajpra opened this issue Mar 8, 2024 · 4 comments

Comments

@surajpra
Copy link

surajpra commented Mar 8, 2024

Execution failed for task ':capacitor-nodejs:compileDebugJavaWithJavac'.

error: invalid source release: 17

image
image
image

@hampoelz
Copy link
Owner

hampoelz commented Mar 9, 2024

It is difficult to solve the problem without further information.

  • It looks like you are using quasar. Does the same error occur with a plain Capacitor project?
  • Does the build work if you only use the other Capacitor plugins, without the NodeJS plugin?
  • Are you using the latest Android Studio version and is your Gradle JVM configured to Java version 17?

@surajpra
Copy link
Author

surajpra commented Mar 9, 2024

It is difficult to solve the problem without further information.

Yes, i am using quasar, but its working fine with plain capacitor project but not with quasar capacitor project.
i am using latest android studio version already updated gradle 8.0.0 and java version 17.

but iam not able to execute

error - Unable to copy the Node.js project from APK.

@surajpra
Copy link
Author

surajpra commented Mar 9, 2024

my main purpose is, i want to use escpos plugin
https://www.npmjs.com/package/escpos
with capacitorjs.

@hampoelz
Copy link
Owner

hampoelz commented Mar 9, 2024

The error message "Unable to copy the Node.js project from APK." indicates that your nodejs project folder is not included when bundling.

In your project structure, the nodejs project folder is located directly in the capacitor-src folder, but usually it should be located in the the static subfolder (in the case of quasar probably in capacitor-src/static?) to ensure that your nodejs project is taken into account by the bundler.

See https://github.com/hampoelz/Capacitor-NodeJS#minimal-example

But since I've never used quasar, you may need to check if it handles the bundling of your project the same way as capacitor.

@hampoelz hampoelz closed this as completed May 5, 2024
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

2 participants