Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

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

  • 10 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.

  • What went wrong:
    A problem occurred configuring root project 'core'.

Could not open proj generic class cache for build file 'E:\appname\platforms\tempPlugin\core\build.gradle' (C:\Users\username.gradle\caches\7.6\scripts\7qpmns721vn6xym6bz3hp3w5a).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 66

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 1s
Failed to build plugin @nativescript/core :
Error: Command gradlew.bat failed with exit code 1

You must be logged in to vote

Replies: 1 comment

Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.