nativescript error while trying to build app for android #10578
Unanswered
TheDevopsLyf
asked this question in
Q&A
Replies: 1 comment
-
Your issue ("Unsupported class file major version 66") appears to be caused by compiling a class in Java 22 (class file major version 66) and then attempting to run that class in a version prior to Java 22. As far as I'm aware, NativeScript does not support anything higher than Java 17 currently... which may actually be an Android requirement not NativeScript, per se. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to develop a mobile app in nativescript and when i tried to build the apk for android i got this error and the output is also mentioned below:
My environment details:
node version: v21.7.3
javac version: javac 22.0.1
nativescript version: 8.7.2
npm version: output 10.4.0
android studio koala
OS : windows 11
java version "1.8.0_411"
Java(TM) SE Runtime Environment (build 1.8.0_411-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.411-b09, mixed mode)
Output of ns build android
(node:21144) [DEP0040] DeprecationWarning: The
punycode
module is deprecated. Please use a userland alternative instead.(Use
node --trace-deprecation ...
to show where the warning was created)Preparing project...
resolving "./app.scss" to "./app.android.scss"
assets by path .js 7.94 MiB
asset vendor.js 7.55 MiB [compared for emit] (name: vendor) (id hint: defaultVendor)
asset bundle.js 386 KiB [emitted] [compared for emit] (name: bundle)
asset runtime.js 12.6 KiB [compared for emit] (name: runtime)
assets by path fonts/.ttf 374 KiB
asset fonts/fa-solid-900.ttf 204 KiB [compared for emit] [from: app/fonts/fa-solid-900.ttf] [copied]
asset fonts/fa-brands-400.ttf 131 KiB [compared for emit] [from: app/fonts/fa-brands-400.ttf] [copied]
asset fonts/fa-regular-400.ttf 39.1 KiB [compared for emit] [from: app/fonts/fa-regular-400.ttf] [copied]
asset tns_modules/inspector_modules.js 1.23 KiB [compared for emit] (name: tns_modules/inspector_modules)
Entrypoint bundle 7.94 MiB = runtime.js 12.6 KiB vendor.js 7.55 MiB bundle.js 386 KiB
Entrypoint tns_modules/inspector_modules 7.57 MiB = runtime.js 12.6 KiB vendor.js 7.55 MiB tns_modules/inspector_modules.js 1.23 KiB
orphan modules 16.3 KiB [orphan] 9 modules
runtime modules 2.72 KiB 8 modules
modules by path ./node_modules/ 2.83 MiB
javascript modules 2.56 MiB 555 modules
json modules 273 KiB
modules by path ./node_modules/mdn-data/css/*.json 242 KiB 3 modules
modules by path ./node_modules/css-tree/ 30.7 KiB
./node_modules/css-tree/package.json 1.65 KiB [built] [code generated]
./node_modules/css-tree/data/patch.json 29 KiB [built] [code generated]
modules by path ./app/ 135 KiB
optional modules 11.1 KiB [optional] 12 modules
external "~/package.json" 42 bytes [optional] [built] [code generated]
webpack 5.92.1 compiled successfully in 3959 ms
Webpack compilation complete.
FAILURE: Build failed with an exception.
A problem occurred configuring root project 'core'.
BUILD FAILED in 1s
Failed to build plugin @nativescript/core :
Error: Command gradlew.bat failed with exit code 1
Beta Was this translation helpful? Give feedback.
All reactions