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: #76

Open
eugenedw opened this issue Nov 20, 2024 · 1 comment
Open

bug: #76

eugenedw opened this issue Nov 20, 2024 · 1 comment
Labels
bug/fix Something isn't working needs: triage

Comments

@eugenedw
Copy link

eugenedw commented Nov 20, 2024

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:

  1. Download the latest version of the plugin.
  2. Configure the plugin for Android using the settings defined in the README.md.
  3. Run the command to launch Android Studio
ionic capacitor build android
  1. 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! 👌
@eugenedw eugenedw added bug/fix Something isn't working needs: triage labels Nov 20, 2024
@sufian1985
Copy link

Facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix Something isn't working needs: triage
Projects
None yet
Development

No branches or pull requests

2 participants