You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently updated my React Native project from version 0.67.3 to 0.75.4, following the instructions provided by the React Native upgrade helper. After running npm install, everything worked as expected. However, when I attempted to build the project using Gradle with the following commands:
./gradlew clear
./gradlew build
I encountered the following errors during the ./gradlew clear command:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file 'MyProject/android/app/build.gradle' line: 84
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not read script 'MyProject/node_modules/react-native/react.gradle' as it does not exist.
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
Missing react.gradle file: It seems like the react.gradle file is missing from node_modules/react-native.
SDK version not recognized: Even though I’ve set compileSdkVersion = 33 in my build.gradle file, the error suggests that it's not specified.
Questions:
Do I need to update the Gradle version, Kotlin version, or SDK versions (buildToolsVersion, minSdkVersion, compileSdkVersion, targetSdkVersion, ndkVersion) to fix these issues?
How do I resolve the missing react.gradle file?
Is there any additional configuration required after upgrading React Native to version 0.75.4?
I'm fairly new to React Native and would appreciate any help or guidance!
The text was updated successfully, but these errors were encountered:
If the version gap is quite big as it's in your case, I would suggest to create a new project and migrate your existing code there, that would be the easiest approach.
I was also upgrading my app from 0.69 to 0.75 and wasted almost a week figuring out everything, ultimately decided to create a new project and do the migration which worked like a charm for me.
I recently updated my React Native project from version
0.67.3
to0.75.4
, following the instructions provided by the React Native upgrade helper. After runningnpm install
, everything worked as expected. However, when I attempted to build the project using Gradle with the following commands:I encountered the following errors during the
./gradlew clear
command:Here’s my
android/build.gradle
configuration:My
gradle-wrapper.properties
file:Issues:
react.gradle
file: It seems like thereact.gradle
file is missing fromnode_modules/react-native
.compileSdkVersion = 33
in mybuild.gradle
file, the error suggests that it's not specified.Questions:
buildToolsVersion
,minSdkVersion
,compileSdkVersion
,targetSdkVersion
,ndkVersion
) to fix these issues?react.gradle
file?0.75.4
?I'm fairly new to React Native and would appreciate any help or guidance!
The text was updated successfully, but these errors were encountered: