Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android build failed #281

Open
ferozm991 opened this issue Oct 28, 2022 · 9 comments
Open

android build failed #281

ferozm991 opened this issue Oct 28, 2022 · 9 comments

Comments

@ferozm991
Copy link

Android build failing :
react-native-text-input-mask ==> ^3.1.4
react-native==> 0.68.2

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-text-input-mask:compileReleaseKotlin'.

Internal compiler error. See log for more details

@muzammil-majeed-viabletree

any updated? we are facing the same issue.

@bbubn
Copy link

bbubn commented Nov 9, 2022

Same configuration and the same problem...
My Kotlin Gradle plugin version is 1.6.21

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':react-native-text-input-mask' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31

@VitorGabrieldeOliveira
Copy link

I added two lines in android/build.gradle and it worked for me.

buildscript {
    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        kotlin_version = '1.6.10' <<-- This line
.
.
.
    dependencies {
        classpath("com.android.tools.build:gradle:7.0.4")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("de.undercouch:gradle-download-task:4.1.2")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") <<-- This line

@msalik42
Copy link

msalik42 commented Jan 2, 2023

I added two lines in android/build.gradle and it worked for me.

buildscript {
    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        kotlin_version = '1.6.10' <<-- This line
.
.
.
    dependencies {
        classpath("com.android.tools.build:gradle:7.0.4")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("de.undercouch:gradle-download-task:4.1.2")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") <<-- This line

Worked for me

@srymarz
Copy link

srymarz commented Jan 26, 2023

Hi,
same problem for me but I need min kotlin_version = '1.6.20'

* What went wrong:
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-text-input-mask' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10

@sanjeevkse
Copy link

I added two lines in android/build.gradle and it worked for me.

buildscript {
    ext {
        buildToolsVersion = "31.0.0"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        kotlin_version = '1.6.10' <<-- This line
.
.
.
    dependencies {
        classpath("com.android.tools.build:gradle:7.0.4")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("de.undercouch:gradle-download-task:4.1.2")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") <<-- This line

For others, who are still facing the issue, This is in library's build file, not your app build file.

@FARUK-YILDIRIM
Copy link

Here my temp solution. Find this file in your node_modules folder https://github.com/react-native-text-input-mask/react-native-text-input-mask/blob/master/android/build.gradle and change kotlin versiyon here.

@Vincetroid
Copy link

Vincetroid commented Jul 17, 2023

My solution was update react-native-text-input-mask to 3.2.0 from 3.1.4 and keeping (in my case) kotlin-gradle-plugin version as 1.7.10:

dependencies {
        classpath("com.android.tools.build:gradle:7.1.1")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("de.undercouch:gradle-download-task:5.0.1")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
    }

@akshay-tc
Copy link

My solution was update react-native-text-input-mast to 3.1.5 or higher and update the kotlinVersion to 1.7.10 or higher version

ext{
kotlinVersion = '1.7.10'
// other configuration
}

dependencies {
classpath("com.android.tools.build:gradle:7.1.1")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:5.0.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants