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

Grade Compile error - Unknown Kotlin JVM target: 21 #31

Open
Alniroza opened this issue Aug 5, 2024 · 3 comments
Open

Grade Compile error - Unknown Kotlin JVM target: 21 #31

Alniroza opened this issue Aug 5, 2024 · 3 comments
Labels

Comments

@Alniroza
Copy link

Alniroza commented Aug 5, 2024

Bug Report

Capacitor Version

   Capacitor Doctor

Latest Dependencies:

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

Installed Dependencies:

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

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

Platform(s)

Android

Current Behavior

Installed latest version of google maps (with npm install @capacitor/google-maps@next) so i can run it on Capacitor 6, but im unable to compile for android, i always get the error:

Could not determine the dependencies of task ':capacitor-google-maps:compileDebugKotlin'.

Unknown Kotlin JVM target: 21

npm run start works normally and i can use the map on web.

Expected Behavior

To compile normaly.

Code Reproduction

Just install the latest capacitor-google-maps with
npm install @capacitor/google-maps@next

Other Technical Details

java --version

java 22.0.1 2024-04-16
Java(TM) SE Runtime Environment (build 22.0.1+8-16)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)

Gradle --version

------------------------------------------------------------
Gradle 8.7
------------------------------------------------------------

Build time:   2024-03-22 15:52:46 UTC
Revision:     650af14d7653aa949fce5e886e685efc9cf97c10

Kotlin:       1.9.22
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          21.0.2 (Oracle Corporation 21.0.2+13-LTS-58)
OS:           Windows 11 10.0 amd64

variables.gradle

ext {
    minSdkVersion = 22
    compileSdkVersion = 34
    targetSdkVersion = 34
    androidxActivityVersion = '1.8.0'
    androidxAppCompatVersion = '1.6.1'
    androidxCoordinatorLayoutVersion = '1.2.0'
    androidxCoreVersion = '1.12.0'
    androidxFragmentVersion = '1.6.2'
    coreSplashScreenVersion = '1.0.1'
    androidxWebkitVersion = '1.9.0'
    junitVersion = '4.13.2'
    androidxJunitVersion = '1.1.5'
    androidxEspressoCoreVersion = '3.5.1'
    cordovaAndroidVersion = '10.1.1'
}

gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

Thanks for your help

@ionitron-bot ionitron-bot bot added the triage label Aug 5, 2024
@riccardoFasan
Copy link

Same here. I had to downgrade to Java 17 to get it working.

@dudaka
Copy link

dudaka commented Sep 29, 2024

hi, got the same issue. Need help for fixing it

@brune83
Copy link

brune83 commented Oct 31, 2024

Same issue here. Anyone has a solution???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants