DEV Community

prajin10
prajin10

Posted on

Fix gradle build failed with unknown error. see logs for the run gradlew in expo

This is common issue among react native developer .
Reasons of this

  1. Node Package mismatch (95% of the time )
  2. .gitignore file not available

SOlution
1.Delete node_modules , Delete package_lock.json and then do npm install on fresh package.json ( THis will fix your problem most of the time)

If the issue is not fixed

  1. Create new project
  2. Add dependencies(only) from your package.json and then do npm install
  3. Run the app
  4. Try building again this will work for most of cases

  5. for git error just initialize git using "git init"

Top comments (1)

Collapse
 
mernstack_berdeng444_a54f profile image
Mernstack Berdeng444

Is that effective? I encountered a problem when I ran this command:
eas build --profile development --platform android --clear-cache.

The issue is:
Build failed
🤖 Android build failed:
Gradle build failed with an unknown error. See the logs for the "Run gradlew" step.

✖ Build failed
🤖 Android build failed:
Gradle build failed with an unknown error. See the logs for the "Run gradlew" step.

✖ Build failed
✖ Build failed
🤖 Android build failed