On this page:
https://facebook.github.io/react-native/docs/android-building-from-source.html
It says that I can create a local.properties file with the sdk.dir and ndk.dir variables, and put it at the root of your react-native checkout... at first I was confused, should I add it to node_modules/react-native/? But finally it worked when I put it in android/.
So unless I misunderstood something, the doc should be fixed.