Support for Android Gradle Plugin Version 7.30
Description
The Android Gradle plugin supports only kotlin-android-extensions Gradle plugin version 1.6.20 and higher. The following dependencies do not satisfy the required version: project ':react-native-gesture-handler' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20
Steps to reproduce
Upgrade existing android codebase to android Gradle plugin version 7.30
Snack or a link to a repository
any project that is updated to android gradle plugin version 7.3.0
Gesture Handler version
2.60
React Native version
0.69.5
Platforms
Android
JavaScript runtime
No response
Workflow
No response
Architecture
No response
Build type
No response
Device
No response
Device model
No response
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
You can change the version of Kotlin Gesture Handler is using by setting ext.kotlinVersion in your project-level build.gradle. In your case, setting it to 1.6.20 should solve the problem.
As a sidenote, you should consider migrating off of kotlin-android-extensions as it's scheduled for removal in Kotlin 1.8.
You can change the version of Kotlin Gesture Handler is using by setting
ext.kotlinVersionin your project-levelbuild.gradle. In your case, setting it to1.6.20should solve the problem.As a sidenote, you should consider migrating off of
kotlin-android-extensionsas it's scheduled for removal in Kotlin 1.8.
Thanks, @j-piasecki will try this, also migration is in WIP for kotlin synthetics.
Where would this Kotlin line be? I'm looking inside of my build.gradle and I don't see anything mentioning kotlin at all yet I have the same error.
It would be in the project-level build.gradle:
buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
kotlinVersion="1.6.20"
...
That gives me the following error...
Could not open cp_proj generic class cache for build file '/Users/nicklanese/Documents/GitHub/KidzNMotionDirectory/KidzNMotionNative/android/build.gradle' (/Users/nicklanese/.gradle/caches/7.5.1/scripts/1zemuiejeqx05vvvxe3i9qnv6).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63
I seem to get this error (or something like it) every time I change anything to do with Kotlin, in any level build file
A quick google suggests that it may be caused by JVM/Gradle version mismatch or cache, so you can try changing versions (see compatibility here) and/or clearing cache. Otherwise, I don't think I will be able to help.
You can change the version of Kotlin Gesture Handler is using by setting
ext.kotlinVersionin your project-levelbuild.gradle. In your case, setting it to1.6.20should solve the problem.As a sidenote, you should consider migrating off of
kotlin-android-extensionsas it's scheduled for removal in Kotlin 1.8.
How do you migrate off of kotlin-android-extensions @j-piasecki ?
@timothygorer I don't think I will be able to help much as I haven't used it but here's a migration guide.