Hello people on the internet.
I installed Cordova, Android SDK and java on my Linux machine, but when I run cordova requirements
command it's show me this error:
What should I do?
I also added this code to my .bashrc
file
### Android ###
export ANDROID_HOME=$HOME/Android/Sdk
export ANDROID_SDK_ROOT=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
CodePudding user response:
I think that some of your Path entries need an update.
as executables binaries (for example avdmanager
) are in bin
subfolders so:
export PATH=$PATH:$ANDROID_HOME/tools
should be changed to
export PATH=$PATH:$ANDROID_HOME/tools/bin
CodePudding user response:
avdManager is Android Virtual Device Manager, which manages emulators. My guess is that Cordova is telling you that you don't have an emulator installed, which is not an issue (especially if you are using a device to test). I hadn't run cordova requiremetns
in my own project, but when I do it is failing for both android and iOS. And my project builds and runs just fine for both. I wouldn't worry about it.
Have you tried building your project, does it build or do you also get an error in that case. I'd be more interested in those error logs.
Lastly, trying to use JDK 19 is a bit ambitious for cordova. We just migrated from 8 to 11. I don't think JDK 19 will work yet, 11 is the last version I've seen mentioned in this update doc: https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html