React-Native run-android报错以及adb 命令不识别

来源:互联网 发布:Java编程思想豆瓣 编辑:程序博客网 时间:2024/05/18 02:53

在遇到adb 命令不识别,或者genymotion的模拟器不识别,找不到的问题。都是genymotion配置的不正确。
打开genymotion的adb设置,androidSDK的配置选择自己下载的androidsdk,而不是genymotion默认的选项就可以解决了。
如下是我遇到的错误:

S server already running.Building and installing the app on the device (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:prepareComAndroidSupportSupportV42301Library UP-TO-DATE:app:prepareComFacebookFrescoDrawee081Library UP-TO-DATE:app:prepareComFacebookFrescoFbcore081Library UP-TO-DATE:app:prepareComFacebookFrescoFresco081Library UP-TO-DATE:app:prepareComFacebookFrescoImagepipeline081Library UP-TO-DATE:app:prepareComFacebookFrescoImagepipelineOkhttp081Library UP-TO-DATE:app:prepareComFacebookReactReactNative0222Library UP-TO-DATE:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE:app:prepareDebugDependencies:app:compileDebugAidl UP-TO-DATE:app:compileDebugRenderscript UP-TO-DATE:app:generateDebugBuildConfig UP-TO-DATE:app:generateDebugAssets UP-TO-DATE:app:mergeDebugAssets UP-TO-DATE:app:generateDebugResValues UP-TO-DATE:app:generateDebugResources UP-TO-DATE:app:mergeDebugResources UP-TO-DATE:app:bundleDebugJsAndAssets SKIPPED:app:processDebugManifest UP-TO-DATE:app:processDebugResources UP-TO-DATE:app:generateDebugSources UP-TO-DATE:app:processDebugJavaRes UP-TO-DATE:app:compileDebugJavaWithJavac UP-TO-DATE:app:compileDebugNdk UP-TO-DATE:app:compileDebugSources UP-TO-DATE:app:preDexDebug UP-TO-DATE:app:dexDebug UP-TO-DATE:app:validateDebugSigning:app:packageDebug UP-TO-DATE:app:zipalignDebug UP-TO-DATE:app:assembleDebug UP-TO-DATE:app:installDebug FAILEDFAILURE: Build failed with an exception.What went wrong:Execution failed for task ':app:installDebug'.com.android.builder.testing.api.DeviceException: No connected devices!Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.BUILD FAILEDTotal time: 15.174 secsCould 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 haveset up your Android development environment:https://facebook.github.io/react-native/docs/android-setup.html
2 0
原创粉丝点击