I am getting an error related to gradle when i did git clone and npx react-native run-android?

I am getting an error My name is Amruth V, and I am currently working on a React Native project on behalf of ISKCON Vrindavan. We are integrating the Mappls SDK into our mobile application. I did git clone from thid repository GitHub - mappls-api/mappls-react-native-sdk and got error However, I am encountering a critical error during the Android build process. The build fails with the following error: ./gradlew: line 245: syntax error: unexpected end of file Failed to install the app. Command failed with exit code 2: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Additionally, I noticed a warning regarding react-native-vector-icons and invalid configuration: “dependency.assets” is not allowed. This issue is blocking our development, and we are currently behind schedule. I kindly request urgent call support from your technical team to help resolve this issue at the earliest convenience. Please feel free to reach me directly at +91 8088593685. Looking forward to your prompt assistance.

Hi, please share the complete logs with us these are incomplete. Also, try using npx react-native doctor and share the response of the same as well with us.

This command will help - In utility within the React Native CLI used to diagnose and help fix common issues within your React Native development environment. It checks for the presence and correct configuration of various tools and dependencies required for building and running React Native applications.

Hi,

I’m facing an urgent issue with my React Native project that is blocking development. When I try to run the Android app using npx react-native run-android, the build fails. The npx react-native doctor output looks good for Android, but the build process itself is failing with several “Unresolved reference” errors.

The main issue seems to be a mismatch in Gradle and Kotlin plugin versions. The log explicitly warns about an “Unsupported Kotlin plugin version”.

Here are the terminal logs for reference. npx react-native run-android log:

`info A dev server is already running for this project on port 8081.
info Installing the app…

Configure project :gradle-plugin:react-native-gradle-plugin
WARNING: Unsupported Kotlin plugin version.
The embedded-kotlin and kotlin-dsl plugins rely on features of Kotlin 1.7.10 that might work differently than in the requested version 2.1.20.

e: /Users/amruthv/Public/harisolution/mapplsproject/node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/build.gradle.kts:22:1: Unresolved reference: kotlinDsl
e: /Users/amruthv/Public/harisolution/mapplsproject/node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/build.gradle.kts:23:5: Unresolved reference: jvmTarget
e: /Users/amruthv/Public/harisolution/mapplsproject/node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/build.gradle.kts:46:9: Unresolved reference: warningsAsErrors
e: /Users/amruthv/Public/harisolution/mapplsproject/node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/build.gradle.kts:46:81: Unresolved reference…

FAILURE: Build failed with an exception.

  • What went wrong:
    Script compilation errors:
    Line 22: kotlinDsl { ^ Unresolved reference: kotlinDsl
    Line 23: jvmTarget.set(“1.8”) ^ Unresolved reference: jvmTarget
    Line 46: warningsAsErrors = (enableWarningsAsErrors.get() || allWarningsAsErrors.get()) ^ Unresolved reference: warningsAsErrors
    4 errors` npx react-native doctor log:

`Common
✓ Node.js - Required to execute JavaScript code
✓ npm - Required to install NPM dependencies
✓ Watchman - Used for watching changes in the filesystem when in development mode
✓ Metro - Required for bundling the JavaScript code

Android
✓ Adb - Required to verify if the android device is attached correctly
✓ JDK - Required to compile Java code
✓ Android Studio - Required for building and installing your app on Android
✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
✓ Gradlew - Build tool required for Android builds
✓ Android SDK - Required for building and installing your app on Android

iOS
:heavy_multiplication_x: Xcode - Required for building and installing your app on iOS

  • Version found: N/A
  • Version supported: >= 12.x
    ✓ Ruby - Required for installing iOS dependencies
    ✓ CocoaPods - Required for installing iOS dependencies
    ✓ .xcode.env - File to customize Xcode environment

Errors: 1
Warnings: 0` Any assistance with resolving this Gradle/Kotlin version issue would be greatly appreciated.