I followed your documentation but error to gradle project sync error

I followed your documentation but error to gradle project sync error

1st step : yarn install
2nd step : npx react-native start

inside project folder

3rd step : yarn start

4th step : npx react-native run-android

5th : react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

it worked