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

[Bug]: Inconsistent JVM-target compatibility detected #7771

Closed
1 of 3 tasks
sake12 opened this issue Nov 20, 2024 · 4 comments
Closed
1 of 3 tasks

[Bug]: Inconsistent JVM-target compatibility detected #7771

sake12 opened this issue Nov 20, 2024 · 4 comments
Labels

Comments

@sake12
Copy link

sake12 commented Nov 20, 2024

Capacitor Version

Capacitor Doctor

Latest Dependencies:

@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0

Installed Dependencies:

@capacitor/android: 6.2.0
@capacitor/core: 6.2.0
@capacitor/cli: 6.2.0
@capacitor/ios: 6.2.0

[success] Android looking great! 👌
[error] Xcode is not installed

Other API Details

Android Studio Ladybug | 2024.2.1 Patch 2
Build #AI-242.23339.11.2421.12550806, built on October 24, 2024
Runtime version: 21.0.3+-12282718-b509.11 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 10240M
Cores: 32
Registry:
  debugger.new.tool.window.layout=true
  ide.experimental.ui=true
  i18n.locale=
Non-Bundled Plugins:
  Dart (242.22855.32)
  io.flutter (82.1.3)

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

Task :capacitor-barcode-scanner:compileReleaseKotlin FAILED
Execution failed for task ':capacitor-barcode-scanner:compileReleaseKotlin'.
Inconsistent JVM-target compatibility detected for tasks 'compileReleaseJavaWithJavac' (17) and 'compileReleaseKotlin' (21).

  • 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.
Get more help at https://help.gradle.org.
BUILD FAILED in 10s
395 actionable tasks: 161 executed, 234 up-to-date

Expected Behavior

Build should work.

Project Reproduction

https://github.com/sake12/build_fails

Additional Information

No response

@sake12 sake12 added the triage label Nov 20, 2024
@sake12
Copy link
Author

sake12 commented Nov 20, 2024

Is it because AndroidStudio updated Java to 21?
image

@sake12
Copy link
Author

sake12 commented Nov 20, 2024

OK, my bad. They changed bundled version to 21 and i was using it.

https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under

All the products on all the supported platforms already have 64-bit JetBrains Runtime 21 bundled and it will be used by default to run the IDE. If you need to change the runtime to a different version, see below. Please note that all the current IDE versions require at least Java 17 version to run. Our IDEs will not run on the older Java versions like Java 8 or 11.

@jcesarmobile
Copy link
Member

Capacitor itself doesn't use kotlin and isn't configured to use any specific version, so if you use plugins that use kotlin they will use the default java version of your system.
The plugins will need to be updated to use JVM 17 instead of 21.

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
Copy link

ionitron-bot bot commented Dec 25, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Dec 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants