gpt4 book ai didi

javascript - react native : Tried to run my first app

转载 作者:太空狗 更新时间:2023-10-29 15:40:32 26 4
gpt4 key购买 nike

我试图运行我的 react-native 项目,但我得到了这个错误:

Aniss-Cherkaoui:AwesomeProject Error_404$ react-native run-android Starting JS server... /bin/sh: adb: command not found 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:prepareComAndroidSupportSupportV42321Library UP-TO-DATE :app:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE :app:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE :app:prepareComFacebookFrescoFresco0110Library UP-TO-DATE :app:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE :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 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 FAILED

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.

最佳答案

请确保您已安装 sdk 并正确设置 sdk 和 android platform-tools 的路径。

检查你的 .bashrc 文件或者如果在 mac 上检查 .bashprofile。

或者您还可以在每次运行该应用程序时执行此操作。

在项目文件夹中运行以下命令。(如果您遵循官方 RN 文档,这些路径将有效)。

导出 ANDROID_HOME=~/Library/Android/sdk

导出路径=${PATH}:${ANDROID_HOME}/tools

export PATH=${PATH}:${ANDROID_HOME}/platform-tools

关于javascript - react native : Tried to run my first app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40765727/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com