-
Notifications
You must be signed in to change notification settings - Fork 33
Closed as not planned
Labels
Description
Plugin version:
4.0.1
Platform(s):
Android
Current behavior:
Cannot run application due to Kotlin errors
Execution failed for task ':capacitor-community-photoviewer:kaptGenerateStubsDebugKotlin'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':capacitor-community-photoviewer:kaptGenerateStubsDebugKotlin'.
> Failed to calculate the value of property 'jvmTarget'.
> Unknown Kotlin JVM target: 21
Expected behavior:
The expectation is that, after applying all the documented configuration settings, that the mobile application will run on a mobile device or emulator. Because of the compilation failures with Kotlin, it doesn't.
Steps to reproduce:
- Download the latest version of the plugin.
- Configure the plugin for Android using the settings defined in the README.md.
- Run the command to launch Android Studio
ionic capacitor build android
- From Android Studio, run the app
Related code:
build.gradle (Module :capacitor-community-photoviewer)
buildscript {
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.7.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
...
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
buildFeatures {
dataBinding true
}
}
Other information:
Capacitor doctor:
💊 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/cli: 5.7.2
@capacitor/core: 5.7.2
@capacitor/android: 5.7.2
@capacitor/ios: 5.7.2
[success] iOS looking great! 👌
[success] Android looking great! 👌
Nairod36 and JasonAsmk