react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Support for Android Gradle Plugin Version 7.30

Open iamarjun opened this issue 3 years ago • 6 comments

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

iamarjun avatar Sep 16 '22 05:09 iamarjun

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?

github-actions[bot] avatar Sep 16 '22 06:09 github-actions[bot]

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.

j-piasecki avatar Sep 16 '22 08:09 j-piasecki

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.

Thanks, @j-piasecki will try this, also migration is in WIP for kotlin synthetics.

iamarjun avatar Sep 16 '22 09:09 iamarjun

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.

NLanese avatar Sep 30 '22 18:09 NLanese

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"
        ...

j-piasecki avatar Oct 03 '22 06:10 j-piasecki

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

NLanese avatar Oct 03 '22 16:10 NLanese

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.

j-piasecki avatar Oct 10 '22 08:10 j-piasecki

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.

How do you migrate off of kotlin-android-extensions @j-piasecki ?

timothygorer avatar Nov 08 '22 19:11 timothygorer

@timothygorer I don't think I will be able to help much as I haven't used it but here's a migration guide.

j-piasecki avatar Nov 09 '22 08:11 j-piasecki