I’m encountering a build issue after upgrading my React Native project from version 0.74.3 to 0.75.0. The problem occurs only on Android; everything works fine on iOS. Whenever I attempt to run any Android-related command (e.g., ./gradlew clean), I receive the following error:
FAILURE: Build failed with an exception.
* Where:
Script '/Users/mehmetsozd/Desktop/almiratur/almira_app/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 418
* What went wrong:
Could not compile script '/Users/mehmetsozd/Desktop/almiratur/almira_app/node_modules/@react-native-community/cli-platform-android/native_modules.gradle'.
> startup failed:
script '/Users/mehmetsozd/Desktop/almiratur/almira_app/node_modules/@react-native-community/cli-platform-android/native_modules.gradle': 418: [Static type checking] - No such property: inputStream for class: java.lang.Process
@ line 418, column 31.
def output = process.inputStream.text.trim()
^
script '/Users/mehmetsozd/Desktop/almiratur/almira_app/node_modules/@react-native-community/cli-platform-android/native_modules.gradle': 418: [Static type checking] - No such property: text for class: java.lang.Object
@ line 418, column 43.
f output = process.inputStream.text.trim
^
script '/Users/mehmetsozd/Desktop/almiratur/almira_app/node_modules/@react-native-community/cli-platform-android/native_modules.gradle': 418: [Static type checking] - Cannot find matching method java.lang.Object#trim(). Please check if the declared type is correct and if the method exists.
@ line 418, column 24.
def output = process.inputStream.text.trim()
^
3 errors
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUİLD FAILED in 332ms
Has anyone experienced a similar issue after upgrading React Native? What could be causing this, and how can I resolve it?
Any help would be greatly appreciated. Thank you!
2
Answers
I dont have this problem when I do clean but I do have build problem on stripe related stuff for android
I fixed it by installing "react-native": 0.74.6 version which is the 74-stable one. you may give it a go.