Abedalkareem / games_services

A Flutter plugin to support game center and google play games services.
122 stars 49 forks source link

Build failed with an exception #174

Closed 45manu95 closed 2 weeks ago

45manu95 commented 2 months ago

Hi! I was update my app and i got this error:

FAILURE: Build failed with an exception.

BUILD FAILED in 9m 27s Error: Gradle task assembleDebug failed with exit code 1

Exited (1).

I think the error is due to a mismatch between the Java versions used for compiling Kotlin and Java code in this project. Specifically, the Kotlin compiler is configured to use Java 17, while the Java compiler is set to use Java 8.

I think the solutions is to update the build.gradle of the Affected Module (:games_services) in order to ensure that both the Kotlin and Java compilers use Java 17.

Example: android { compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 }

kotlinOptions {
    jvmTarget = '17'
}

}

vintage commented 2 months ago

It's been fixed some time ago through https://github.com/Abedalkareem/games_services/pull/168 but not yet released to the pub.dev

theLee3 commented 2 weeks ago

Closing as this is fixed. @Abedalkareem Can we publish the latest to pub.dev soon?

Abedalkareem commented 2 weeks ago

@theLee3

Thanks, Yes published now!