Home › Build error fixes › Android / Gradle
The gradlew script is outdated or damaged
Android / Gradle · last reviewed 2026-11-10
The error looks like this
[RUN_GRADLEW] gradlew: 154: Syntax error: "(" unexpectedWhy it happens
android/gradlew is from a much older Gradle than the wrapper version, or it was saved with Windows line endings.
How to fix it
- Regenerate it: cd android && gradle wrapper (or copy gradlew from a fresh React Native / Expo template of your version).
- Make sure it has Unix line endings and is executable: chmod +x android/gradlew
- Expo managed apps: delete the android folder and let prebuild create it again.
Not sure this is your error? Let ReleaseMedic read the whole log
Build logs are long and the last line is rarely the real cause. ReleaseMedic finds the first real error, explains it and gives the steps — free, and the log never leaves your computer.
$ npx releasemedic log build.logOr pipe a build straight in: cd android && ./gradlew bundleRelease 2>&1 | npx releasemedic log -
Catch it before you build
Most release errors come from project settings you can check in seconds — signing, SDK levels, privacy manifests, permissions, push and login setup.
$ npx releasemedic