-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Capacitor Version
Latest Dependencies:
@capacitor/cli: 7.0.1
@capacitor/core: 7.0.1
@capacitor/android: 7.0.1
@capacitor/ios: 7.0.1
Installed Dependencies:
@capacitor/android: 7.0.1
@capacitor/cli: 7.0.1
@capacitor/ios: 7.0.1
@capacitor/core: 7.0.1
Platforms Affected
- iOS
- Android
- Web
Current Behavior
I just had a discussion with the maintainer of a Capacitor community package (see here capacitor-community/safe-area#43) who believes that Android does not support JDK 21 and only supports up to JDK 17. Because of this, I am unable to use this plugin. After a quick search, I came across https://developer.android.com/build/jdks which confirms that JDK 17 is used throughout.
Why does the latest version of Capacitor require JDK 21? Is it officially supported?
Expected Behavior
I am not sure, but imo Capacitor should use
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
instead of 21
Answer of the capacitor-community plugin member:
I don't know why it says that. I think there's a lot of misinformation and confusion around the JDK versioning among the Android community. As far as I understand you could try and get JDK 21 to work. If it works for you, good for you. But nowhere does Google claim that Android supports JDK 21 for building. So I think it's a mistake on Capacitor's part