React native 运行 处于 IDLE 状态
React native run stays in IDLE state
这是我第一次在 Ubuntu 18.04 LTS
上设置 React Native。我已完成设置,并尝试使用 react-native run-android
命令 运行 设备上的应用程序。
这是我在终端中得到的输出,
ron@lenovo:~/react/app$ react-native run-android
Scanning folders for symlinks in /home/ron/react/app/node_modules (9ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
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 /home/ron/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.
File /home/ron/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 26.0.3 in /home/ron/Android/Sdk/licenses
License for package Android SDK Build-Tools 26.0.3 accepted.
Preparing "Install Android SDK Build-Tools 26.0.3 (revision: 26.0.3)".
<=============> 100% CONFIGURING
> IDLE
它永远停留在这个空闲位置。修复或此问题是什么?
我今天遇到了同样的错误。解决方案是创建一个名为 local.properties 的文件并在其中写入以下行:
sdk.dir=[the position of android sdk]
示例:
sdk.dir=N\:\Users\andy\AppData\Local\Android\Sdk
您可以通过 android studio 获取 sdk android:Android Studio - How to Change Android SDK Path
希望这对您和其他刚开始学习 React Native 的人有所帮助。
解决方法是安装Android SDK rev. 26.0.3
。您可以从 File > Settings
中的 Android Studio 的 SDK Manager
菜单安装它。希望这有帮助。
这是我第一次在 Ubuntu 18.04 LTS
上设置 React Native。我已完成设置,并尝试使用 react-native run-android
命令 运行 设备上的应用程序。
这是我在终端中得到的输出,
ron@lenovo:~/react/app$ react-native run-android
Scanning folders for symlinks in /home/ron/react/app/node_modules (9ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details
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 /home/ron/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.
File /home/ron/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 26.0.3 in /home/ron/Android/Sdk/licenses
License for package Android SDK Build-Tools 26.0.3 accepted.
Preparing "Install Android SDK Build-Tools 26.0.3 (revision: 26.0.3)".
<=============> 100% CONFIGURING
> IDLE
它永远停留在这个空闲位置。修复或此问题是什么?
我今天遇到了同样的错误。解决方案是创建一个名为 local.properties 的文件并在其中写入以下行:
sdk.dir=[the position of android sdk]
示例:
sdk.dir=N\:\Users\andy\AppData\Local\Android\Sdk
您可以通过 android studio 获取 sdk android:Android Studio - How to Change Android SDK Path
希望这对您和其他刚开始学习 React Native 的人有所帮助。
解决方法是安装Android SDK rev. 26.0.3
。您可以从 File > Settings
中的 Android Studio 的 SDK Manager
菜单安装它。希望这有帮助。