Error in configuring network security xml in android
You need to set your compileSdkVersion
to 24 or higher and set your buildToolsVersion
to 24.0.0
or higher.
With regards to the documentation, that's a documentation bug.
The documentation is fixed, the xml should live inside res/xml which is not in the root but inside android/app:
android/app/src/main/res/xml/network_security_config.xml
From minimumSDK 20 you will need the file and be sure to whitelist localhost and 10.0.2.2 and 10.0.3.2 or you'll have trouble on development