Environment Setup Error

Hi, I am Muhammad Umair, JS developer and three days ago I decided to shift to app development with react-native. I want to guide some of you to resolve your errors which I faced with react 0.79.3.
‘‘Pre-reqs must be installed and set up, Node LTS, Environement Variables and others, for complete guidance watch this video from Sir Hitesh: https://youtu.be/kGtEax1WQFg?si=rCaS5-Zq7mesikZ0
Watch 2 and third both videos”.
Issue: Gradle mismatch and unexpected error when executing the app on android emulator:
1: Make sure to include local.properties file.
2: If the gradle is outdated , follow these steps:
Go to : android/app/build/gradle/gradle.wrapper.properties and change the distribution url with latest gradle version.
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
Next step is: go to build.gradle and in the dependecies block change the class path to latest it will looks something like this: You can use this as well.
dependencies {
classpath("com.android.tools.build:gradle:8.1.0") // Or latest supported by Gradle
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
‘‘IF YOU ENCOUNTER ANY ERROR RELATED TO .kts WHERE IT SAYS, CANNOT SET VALUE OF CONST… JUST REMOVE THOSE LINES THEY ARE NO COMPULSORY AS MUCH”
Still if you need any help, you can simply comment under this blog and I will be heappy to help you out.
Subscribe to my newsletter
Read articles from Umair Arshad directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
