cli icon indicating copy to clipboard operation
cli copied to clipboard

@react-native-community/cli-platform-android cannot building android

Open bayiremir opened this issue 3 months ago • 1 comments

version 0.75.4

FAILURE: Build failed with an exception.

  • Where: Script '/Users/emirbayir/Desktop/uskudarmobileapp/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 418

  • What went wrong: Could not compile script '/Users/emirbayir/Desktop/uskudarmobileapp/node_modules/@react-native-community/cli-platform-android/native_modules.gradle'.

startup failed: script '/Users/emirbayir/Desktop/uskudarmobileapp/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/emirbayir/Desktop/uskudarmobileapp/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/emirbayir/Desktop/uskudarmobileapp/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 612ms

package.json: { "name": "UskudarMobile", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest", "postinstall": "patch-package" }, "dependencies": { "@bam.tech/react-native-image-resizer": "^3.0.11", "@invertase/react-native-apple-authentication": "^2.3.0", "@notifee/react-native": "^9.1.2", "@react-native-clipboard/clipboard": "^1.13.2", "@react-native-community/blur": "^4.4.0", "@react-native-community/checkbox": "^0.5.17", "@react-native-community/datetimepicker": "^8.0.0", "@react-native-community/netinfo": "^11.3.1", "@react-native-firebase/analytics": "20.1.0", "@react-native-firebase/app": "20.1.0", "@react-native-firebase/auth": "20.1.0", "@react-native-firebase/dynamic-links": "20.1.0", "@react-native-firebase/firestore": "20.1.0", "@react-native-firebase/messaging": "20.1.0", "@react-native-firebase/perf": "20.1.0", "@react-native-firebase/remote-config": "20.1.0", "@react-native-google-signin/google-signin": "^11.0.0", "@react-native-picker/picker": "^2.6.1", "@react-navigation/bottom-tabs": "^6.5.11", "@react-navigation/material-top-tabs": "^6.6.5", "@react-navigation/native": "^6.1.9", "@react-navigation/native-stack": "^6.9.17", "@reduxjs/toolkit": "^2.0.1", "@sentry/react-native": "^6.9.1", "@shopify/flash-list": "^1.6.3", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.0.1", "@testing-library/react-native": "^12.8.1", "@types/xml2js": "^0.4.14", "axios": "^1.7.2", "deprecated-react-native-prop-types": "^5.0.0", "geolib": "^3.3.4", "i18next": "^23.8.2", "lottie-react-native": "^6.4.1", "moment": "^2.30.1", "patch-package": "^8.0.0", "postinstall-postinstall": "^2.1.0", "react": "18.2.0", "react-i18next": "^14.0.5", "react-native": "0.75.4", "react-native-actions-sheet": "^0.9.7", "react-native-animatable": "^1.4.0", "react-native-appsflyer": "^6.14.3", "react-native-camera": "^4.2.1", "react-native-change-icon": "^5.0.0", "react-native-circular-progress": "^1.3.9", "react-native-confetti-cannon": "^1.5.2", "react-native-crypto-js": "^1.0.0", "react-native-device-info": "^10.12.0", "react-native-document-picker": "^9.1.1", "react-native-fs": "^2.20.0", "react-native-geolocation-service": "^5.3.1", "react-native-gesture-handler": "2.14.0", "react-native-heroicons": "^3.2.1", "react-native-image-picker": "^7.1.2", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-linear-gradient": "^2.8.3", "react-native-map-link": "^2.11.4", "react-native-maps": "1.14.0", "react-native-mmkv": "^2.12.1", "react-native-modal-datetime-picker": "^17.1.0", "react-native-pager-view": "^6.8.1", "react-native-paper": "^5.12.3", "react-native-passkit-wallet": "^0.1.6", "react-native-permissions": "^4.1.1", "react-native-picker-select": "^9.0.0", "react-native-pie-chart": "^4.0.1", "react-native-popup-menu": "^0.16.1", "react-native-progress": "^5.0.1", "react-native-qrcode-scanner": "^1.5.5", "react-native-qrcode-svg": "^6.3.0", "react-native-reanimated": "3.10.0", "react-native-redash": "^18.1.3", "react-native-render-html": "^6.3.4", "react-native-safe-area-context": "^5.5.2", "react-native-safearea-height": "^1.0.6", "react-native-screens": "4.5.0", "react-native-screenshot-prevent": "^1.2.1", "react-native-sha256": "^1.4.10", "react-native-share": "^12.0.9", "react-native-shared-preferences": "^1.0.2", "react-native-snap-carousel": "^3.9.1", "react-native-splash-screen": "^3.3.0", "react-native-ssl-public-key-pinning": "^1.2.3", "react-native-star-rating-widget": "^1.9.1", "react-native-store-review": "^0.4.3", "react-native-svg": "^15.0.0", "react-native-tab-view": "^3.5.2", "react-native-toast-message": "^2.2.0", "react-native-tracking-transparency": "^0.1.2", "react-native-vector-icons": "^10.0.3", "react-native-video": "^6.7.0", "react-native-webview": "^13.6.4", "react-native-widget-extension": "^0.0.6", "react-native-xml2js": "^1.0.3", "react-redux": "^9.0.4", "rn-gesture-swipeable-flatlist": "^2.3.1", "socket.io-client": "^4.7.4" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "^0.74.81", "@react-native/eslint-config": "^0.74.81", "@react-native/metro-config": "^0.74.81", "@react-native/typescript-config": "^0.74.81", "@types/jest": "^29.5.12", "@types/react": "^18.2.6", "@types/react-native-snap-carousel": "^3.8.10", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", "babel-plugin-module-resolver": "^5.0.2", "eslint": "^8.19.0", "jest": "^29.7.0", "obfuscator-io-metro-plugin": "^2.1.3", "prettier": "2.8.8", "react-native-dotenv": "^3.4.10", "react-test-renderer": "18.2.0", "reactotron-react-native": "^5.1.9", "typescript": "5.0.4" }, "engines": { "node": ">=18" }, "packageManager": "[email protected]" }

i cannot building for android. can you help me?

bayiremir avatar Sep 27 '25 09:09 bayiremir

  • Try latest RN CLI version. You can install manually. Each necessary part that you might be using from the CLI, that is.
  • If you have upgraded RN versions, make sure the files changes / updates are correct.
  • Check if a installed package are not the responsible for it.

dougg0k avatar Nov 12 '25 00:11 dougg0k