Capacitor-NodeJS icon indicating copy to clipboard operation
Capacitor-NodeJS copied to clipboard

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

Open surajpra opened this issue 11 months ago • 4 comments

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

error: invalid source release: 17

image image image

surajpra avatar Mar 08 '24 06:03 surajpra

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?

hampoelz avatar Mar 09 '24 09:03 hampoelz

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 avatar Mar 09 '24 09:03 surajpra

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

surajpra avatar Mar 09 '24 09:03 surajpra

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 avatar Mar 09 '24 13:03 hampoelz