I am using Ubuntu and learning react native. I installed Android Studio and opened an emulator. I am getting this following error.
我正在使用Ubuntu,正在学习原生反应。我安装了Android Studio并打开了一个模拟器。我收到以下错误。
Error: spawn /opt/android-studio/platform-tools/adb ENOENT
When I check this path, its installed in
当我检查此路径时,它安装在
/usr/lib/android-sdk/platform-tools/adb
My PATH variables are,
我的路径变量是,
/home/user/.local/bin:/home/user/.nvm/versions/node/v14.20.0/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/opt/android-studio/bin:/opt/android-studio/bin
even though I update the path with
即使我用来更新路径
export PATH="$PATH:/usr/lib/android-sdk/platform-tools"
I am getting the same error again and again. How do I fix them permenantly?
我一次又一次地收到同样的错误。我如何永久地修复它们?
更多回答
My Android studio installed in ~/learning/android-studio. My bashrc file contents are, export ANDROID_HOME=/opt/android-studio export PATH=$PATH:$ANDROID_HOME/bin
我的Android工作室安装在~/Learning/Android-STUDIO中。我的bashrc文件内容是,EXPORT Android_HOME=/opt/Android-STUDIO EXPORT PATH=$PATH:$Android_HOME/bin
export ANDROID_HOME="/usr/lib/android-sdk/" export PATH="${PATH}:${ANDROID_HOME}tools/:${ANDROID_HOME}platform-tools/"
I added the above and restarted bashrc with source ~/.bashrc
But still i am getting same error.
Export android_home=“/usr/lib/android-sdk/”exportbashrc我添加了上面的内容,并使用PATH=“${PATH}:${ANDROID_HOME}tools/:${ANDROID_HOME}platform-tools/”源文件~/.bashrc重新启动了bashrc,但仍然收到相同的错误。
You sure about the environment setup reactnative.dev/docs/environment-setup?os=linux and installed Android SDK, Android SDK Platform & Android Virtual Device?
您确定环境设置为reactnative.dev/docs/environment-setup?os=linux并安装了Android SDK、Android SDK平台和Android虚拟设备吗?
我是一名优秀的程序员,十分优秀!