hiennguyen92 / flutter_callkit_incoming

Flutter Callkit Incoming
https://pub.dev/packages/flutter_callkit_incoming
MIT License
180 stars 312 forks source link

Unable to build on Android #499

Closed andyli0123 closed 8 months ago

andyli0123 commented 8 months ago

flutter_callkit_incoming version: 2.0.3

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_callkit_incoming:compileDebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).

  Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain
  Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation 

* 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 4s
Error: Gradle task assembleDebug failed with exit code 1
andyli0123 commented 8 months ago

I solved the problem by downgrading the Gradle version from 8.5 to 7.5 in android/gradle/wrapper/gradle-wrapper.properties.

distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
kevinZartek commented 5 months ago

for me i can't use this as solution because it gets me this error while compiling Minimum supported Gradle version is 8.0. Current version is 7.5. If using the gradle wrapper, try editing the distributionUrl in /android/gradle/wrapper/gradle-wrapper.properties to gradle-8.0-all.zip