subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.16k stars 193 forks source link

Build failing with error called "Your project requires a newer version of the Kotlin Gradle plugin." #255

Closed prinzpiuz closed 8 months ago

prinzpiuz commented 8 months ago


Running Gradle task 'assembleRelease'...                        
Checking the license for package NDK (Side by side) 21.1.6352462 in /usr/local/lib/android/sdk/licenses
License for package NDK (Side by side) 21.1.6352462 accepted.
Preparing "Install NDK (Side by side) 21.1.6352462 (revision: 21.1.6352462)".
"Install NDK (Side by side) 21.1.6352462 (revision: 21.1.6352462)" ready.
Installing NDK (Side by side) 21.1.6352462 in /usr/local/lib/android/sdk/ndk/21.1.6352462
"Install NDK (Side by side) 21.1.6352462 (revision: 21.1.6352462)" complete.
"Install NDK (Side by side) 21.1.6352462 (revision: 21.1.6352462)" finished.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
e: /home/runner/.gradle/caches/transforms-3/0801ddae24b[7](https://github.com/prinzpiuz/MSM/actions/runs/6719338892/job/18260783151#step:6:8)7cf27d[8](https://github.com/prinzpiuz/MSM/actions/runs/6719338892/job/18260783151#step:6:9)7650[9](https://github.com/prinzpiuz/MSM/actions/runs/6719338892/job/18260783151#step:6:10)c0834497/transformed/core-1.[10](https://github.com/prinzpiuz/MSM/actions/runs/6719338892/job/18260783151#step:6:11).1-api.jar!/META-INF/core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/88df3bacb0fef7fa67016a8f4cb70ad3/transformed/jetified-kotlin-stdlib-common-1.8.22.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/db3c8f4a4e9d96a16446fb833d3618ef/transformed/jetified-kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/db3c8f4a4e9d96a16446fb833d3618ef/transformed/jetified-kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
e: /home/runner/.gradle/caches/transforms-3/db3c8f4a4e9d96a16446fb833d3618ef/transformed/jetified-kotlin-stdlib-1.8.22.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:compileReleaseKotlin'.
> Compilation error. See log for more details

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* 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 5m [11](https://github.com/prinzpiuz/MSM/actions/runs/6719338892/job/18260783151#step:6:12)s
Running Gradle task 'assembleRelease'...                          [31](https://github.com/prinzpiuz/MSM/actions/runs/6719338892/job/18260783151#step:6:32)1.8s

┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin.                     │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then │
│ update /home/runner/work/MSM/MSM/android/build.gradle:                                     │
│ ext.kotlin_version = '<latest-version>'                                                    │
└────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1
Error: Process completed with exit code 1.```
Please help
TheRedSpy15 commented 7 months ago

How did you solve this? I have tried the latest version and no luck