【发布时间】:2017-04-07 12:53:36
【问题描述】:
我试图运行我的 react-native 项目,但我得到了这个错误:
Aniss-Cherkaoui:AwesomeProject Error_404$ react-native run-android 启动 JS 服务器... /bin/sh: adb: 找不到命令 在设备上构建和安装应用程序(cd android && ./gradlew installDebug... :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE :app:prepareComFacebookFrescoDrawee0110图书馆最新 :app:prepareComFacebookFrescoFbcore0110图书馆最新 :app:prepareComFacebookFrescoFresco0110图书馆最新 :app:prepareComFacebookFrescoImagepipeline0110图书馆最新 :app:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE :app:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE :app:prepareComFacebookReactReactNative0370Library UP-TO-DATE :app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE :app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl 最新 :app:compileDebugRenderscript 最新 :app:generateDebugBuildConfig 最新 :app:generateDebugAssets 最新 :app:mergeDebugAssets 最新 :app:generateDebugResValues 最新 :app:generateDebugResources 最新 :app:mergeDebugResources 最新 :app:bundleDebugJsAndAssets 已跳过 :app:processDebugManifest 最新 :app:processDebugResources 失败
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:processDebugResources'. > at index 4 * 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: 10.769 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. Go to https://facebook.github.io/react-native/docs/getting-started.html and check the Android tab for setup instructions.
【问题讨论】:
-
adb: command not found,你安装Android Studio了吗?如果没有,请按照此处的说明进行操作:facebook.github.io/react-native/docs/getting-started.html(切换到移动操作系统部分到 Android) -
按照说明进行操作 here
-
是的,我已经安装了 Android Studio,并按照说明进行操作,但出现此错误。我从 Mac 运行我的应用程序
标签: javascript android facebook build react-native