无法下载任何源列表! (node.js v10.7.0 | yarn 1.7.0 | react-native: 0.56.0 | Windows 10)

Failed to download any source lists! (node.js v10.7.0 | yarn 1.7.0 | react-native: 0.56.0 | Windows 10)

我正尝试使用 hear 阐明的步骤 运行 一个 hello world 应用程序。我很确定我已经完成了所有步骤。但是当我尝试 react-native run-android 时,出现以下错误。

react-native run-android ouput

C:\Users\Mike-laptop\AwesomeProject>react-native run-android
Scanning folders for symlinks in C:\Users\Mike-laptop\AwesomeProject\node_modules (43ms)
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\Users\Mike-laptop\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

Failed to download any source lists!
java.io.FileNotFoundException: https://dl.google.com/android/repository/repository2-1.xml

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to find Build Tools revision 26.0.3

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4.602 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

请注意,我运行宁所有代理背后...这很可能是因为 react-native 没有使用我设置的代理。 我尝试以不同的方式配置事物。

仍然没有运气:(

非常感谢任何评论。

首先,您需要将 Android 环境配置为 运行 Android 应用程序。

请执行此 link 中的步骤,在 Building Projects with Native Code 选项卡中,选择 Windows 和 Android。:

https://facebook.github.io/react-native/docs/getting-started.html

确保在 Android Studio 中安装 Android SDK 构建工具 26.0.3。