我无法运行我的第一个应用程序,因为adb’未被识别为内部或外部命令,可 *** 作程序或批处理文件而出现错误.
我检查了androID sdk-> platform-tools->我可以在那里看到adb.exe.
构建成功但在运行时出错.下面是我的cmd提示符
Microsoft windows [Version 10.0.14393](c) 2016 Microsoft Corporation. All rights reserved.E:\ReactWorkSpace\MyFirstApp>react-native run-androIDScanning 560 folders for symlinks in E:\ReactWorkSpace\MyFirstApp\node_modules (72ms)Js server already running.Building and installing the app on the device (cd androID && gradlew.bat installDeBUG)...Incremental java compilation is an incubating feature.:app:preBuild UP-TO-DATE:app:preDeBUGBuild UP-TO-DATE:app:checkDeBUGManifest:app:preReleaseBuild UP-TO-DATE:app:prepareComAndroIDSupportAppcompatV72301library:app:prepareComAndroIDSupportRecyclervIEwV72340library:app:prepareComAndroIDSupportSupportV42340library:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100library:app:prepareComFacebookFrescoDrawee101library:app:prepareComFacebookFrescoFbcore101library:app:prepareComFacebookFrescoFresco101library:app:prepareComFacebookFrescoImagepipeline101library:app:prepareComFacebookFrescoImagepipelineBase101library:app:prepareComFacebookFrescoImagepipelineOkhttp3101library:app:prepareComFacebookReactReactNative0434library:app:prepareComFacebookSoloaderSoloader010library:app:prepareOrgWebkitAndroIDJscR174650library:app:prepareDeBUGDependencIEs:app:compileDeBUGAIDl:app:compileDeBUGRenderscript:app:generateDeBUGBuildConfig:app:mergeDeBUGShaders:app:compileDeBUGShaders:app:generateDeBUGAssets:app:mergeDeBUGAssets:app:generateDeBUGResValues:app:generateDeBUGResources:app:mergeDeBUGResources:app:bundleDeBUGJsAndAssets SKIPPED:app:processDeBUGManifest:app:processDeBUGResources:app:generateDeBUGSources:app:incrementalDeBUGJavaCompilationSafeguard:app:compileDeBUGJavaWithJavac:app:compileDeBUGJavaWithJavac - is not incremental (e.g. outputs have changed,no prevIoUs execution,etc.).:app:compileDeBUGNdk UP-TO-DATE:app:compileDeBUGSources:app:transformClassesWithDexForDeBUGRunning dex in-process requires build tools 23.0.2.For faster builds update this project to use the latest build tools.:app:mergeDeBUGJnilibFolders:app:transformNative_libsWithMergeJnilibsForDeBUG:app:processDeBUGJavaRes UP-TO-DATE:app:transformResourcesWithMergeJavaResForDeBUG:app:valIDateSigningDeBUG:app:packageDeBUG:app:assembleDeBUG:app:installDeBUGInstalling APK 'app-deBUG.apk' on 'A16 - 4.2.2' for app:deBUGInstalled on 1 device.BUILD SUCCESSFulTotal time: 7 mins 4.412 secs'adb' is not recognized as an internal or external command,operable program or batch file.Starting the app (D:\AndroID\sdk/platform-tools/adb shell am start -n com.myfirstapp/.MainActivity...Starting: Intent { cmp=com.myfirstapp/.MainActivity }E:\ReactWorkSpace\MyFirstApp>
我没有使用模拟器,使用自己的移动设备.应用程序在我的设备中启动,但我看到的只是一个白色的空白屏幕.我按照官方网站上的说法正确遵循了所有说明.
谢谢.
解决方法 我找到了解决方案.您所要做的就是在系统变量中添加adb路径.
复制adb位置,然后转到Controlpanel-> System-> Advnaced System Settings-> Environment Variables->在系统变量下,您将找到PATH变量,首先选择并单击Edit,然后单击New并粘贴您的adb路径,现在单击确定.多数民众赞成解决问题.
现在重新启动命令提示符,并运行react-native run-androID.有用:)
希望这有助于某人.谢谢你查看我的问题.
总结以上是内存溢出为你收集整理的android – react-native:’adb’不被识别为内部或外部命令,可 *** 作程序或批处理文件全部内容,希望文章能够帮你解决android – react-native:’adb’不被识别为内部或外部命令,可 *** 作程序或批处理文件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)