Home > Software design >  Task :segment_analytics-react-native:writeDebugAarMetadata FAILED
Task :segment_analytics-react-native:writeDebugAarMetadata FAILED

Time:10-24

I'm struggling with this problem when I execute with CLI, which is "npm run android".

Here is my log.


> Task :segment_analytics-react-native:writeDebugAarMetadata FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':segment_analytics-react-native:writeDebugAarMetadata'.
> Failed to create parent directory '/Users/-/app/node_modules/@segment/analytics-react-native/android/build' when creating directory '/Users/-/app/node_modules/@segment/analytics-react-native/android/build/intermediates/aar_metadata/debug'

BUILD FAILED in 8s

Please save me.

CodePudding user response:

Remove node_modules folder and fire a command

1. cd android
2. ./gradlew clean
3. cd ..
4. npm install or yarn install
5. npx react-native run-android or yarn android

I hope it works for you.

  • Related