eas build failed with Kotlin Gradle plugin version incompatibility in SDK48

Please provide the following:

  1. SDK Version:48
  2. Platforms(Android/iOS/web/all):Android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

eas android build failed. Error log is shown below. Would like some help. Thanks: ```
AAR for react-native-reanimated has been found

164

/home/expo/workingdir/build/node_modules/react-native-reanimated/android/react-native-reanimated-71-hermes.aar

165[stderr]

FAILURE: Build failed with an exception.

166[stderr]
  • What went wrong:
167[stderr]

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.

168[stderr]

The following dependencies do not satisfy the required version:

169[stderr]

project ‘:expo-app-auth’ → org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21

170[stderr]
  • Try:
171[stderr]

Run with --stacktrace option to get the stack trace.

172[stderr]

Run with --info or --debug option to get more log output.

173[stderr]

Run with --scan to get full insights.

174[stderr]
175[stderr]

BUILD FAILED in 3m 41s

176

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

177

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

178

See Command-Line Interface

179

10 actionable tasks: 10 executed

180

Error: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.

Can anyone please help me out with this issue. I have spent the last 2 days and expended 14 eas android builds on this issue. I first tried to change the expo-app-auth’ → org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21 to 1.5.20, and when I was still getting the same error I decided to remove expo-app-auth from my project, yet the error still remains.

Please any suggestion would be most welcome. this is my build.gradle and below after is the eas build error log

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = “31.0.0”
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31

    if (System.properties['os.arch'] == "aarch64") {
        // For M1 Users we need to use the NDK 24 which added support for aarch64
        ndkVersion = "24.0.8215888"
    } else {
        // Otherwise we default to the side-by-side NDK version from AGP.
        ndkVersion = "21.4.7075529"
    }
}
repositories {
    google()
    mavenCentral()
}
dependencies {
    classpath("com.android.tools.build:gradle:7.2.1")
    classpath("com.facebook.react:react-native-gradle-plugin")
    classpath("de.undercouch:gradle-download-task:5.0.1")
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

def REACT_NATIVE_VERSION = new File([‘node’, ‘–print’,“JSON.parse(require(‘fs’).readFileSync(require.resolve(‘react-native/package.json’), ‘utf-8’)).version”].execute(null, rootDir).text.trim())

allprojects {
configurations.all {
resolutionStrategy {
force “com.facebook.react:react-native:” + REACT_NATIVE_VERSION
}
}

repositories {
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url("$rootDir/../node_modules/react-native/android")
    }
    maven {
        // Android JSC is installed from npm
        url("$rootDir/../node_modules/jsc-android/dist")
    }
    mavenCentral {
        // We don't want to fetch react-native from Maven Central as there are
        // older versions over there.
        content {
            excludeGroup "com.facebook.react"
        }
    }
    google()
    maven { url 'https://www.jitpack.io' }
}

}

This my app.config.js plugins.android

android: {
compileSdkVersion: 31,
targetSdkVersion: 31,
buildToolsVersion: ‘31.0.0’,
},

  - expo-structured-headers (3.1.1)

146

  - expo-updates (0.16.4)

147

  - expo-web-browser (12.1.1)

148

WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

149

> Configure project :react-native-firebase_app

150

:react-native-firebase_app package.json found at /home/expo/workingdir/build/node_modules/@react-native-firebase/app/package.json

151

:react-native-firebase_app:firebase.bom using default value: 31.2.3

152

:react-native-firebase_app:play.play-services-auth using default value: 20.3.0

153

:react-native-firebase_app package.json found at /home/expo/workingdir/build/node_modules/@react-native-firebase/app/package.json

154

:react-native-firebase_app:version set from package.json: 17.3.2 (17,3,2 - 17003002)

155

:react-native-firebase_app:android.compileSdk using custom value: 31

156

:react-native-firebase_app:android.targetSdk using custom value: 31

157

:react-native-firebase_app:android.minSdk using custom value: 21

158

:react-native-firebase_app:reactNativeAndroidDir /home/expo/workingdir/build/node_modules/react-native/android

159[stderr]

FAILURE:

160[stderr]

Build failed with an exception.

161[stderr]

* What went wrong:

162[stderr]

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.

163[stderr]

The following dependencies do not satisfy the required version:

164[stderr]

project ':expo-app-auth' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21

165[stderr]

* Try:

166[stderr]

> Run with --stacktrace option to get the stack trace.

167[stderr]

> Run with --info or --debug option to get more log output.

168[stderr]

> Run with --scan to get full insights.

169[stderr]

* Get more help at https://help.gradle.org

170[stderr]

BUILD FAILED

171

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

172

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

173

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

174[stderr]

in 3m 24s

175

10 actionable tasks: 10 executed

176

Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information

Was able to build today. I had so much amended my build.gradle (even changed the version from 33 to 31) when all i should have done was to address the erring module: expo-app-auth.
Initially I had deleted the expo-app-auth from the node_modules but was still getting the same error ‘:expo-app-auth’ → org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21 so was wondering why? Then I uninstalled the package (expo-google-app-auth) that was dependent on expo-app-auth.
Then reverted to the original build.gradle and have been able to build the android apk

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.