Wed, 22 Dec 2021 08:21:28 GMT
Join the conversation at slack.cordova.io
Tue, 21 Dec 2021 14:55:08 GMT
@leo.skrilax91 says
Hi ! I am facing a small problem regarding the build of my application, i currently want to build my app on linux ubuntu 20, i‘ve android studio installed, cordova too. But cordova is not able to recognize android studio so it doesn’t have gradle and build tool. I know that i need to update my PATH var but i don't know what i have to put in
Tue, 21 Dec 2021 14:58:29 GMT
@norman137 says
This is what I have in my
~/.bashrc
. It won't be plug and play, your paths depends on where you have things installed. But I am also on Ubuntu 20.export ANDROID_SDK_ROOT="/home/norman/Android/Sdk" export ANDROID_HOME=$ANDROID_SDK_ROOT export PATH="$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin" export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools/" export PATH="$PATH:$ANDROID_SDK_ROOT/emulator/" export PATH="$PATH:$ANDROID_SDK_ROOT/build-tools/30.0.3/" export PATH="$PATH:/development/Apps/gradle/bin" export PATH="/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH"``` If you installed java jdk via apt, the path is probably the same (unless if you're using java 11, in which case you should have a `java-11-openjdk-amd64` folder. Generally speaking, I have all my dev tools placed in a `/development/Apps/` folder, but so you have to update these paths to wherever you have android sdk and gradle installed. Also don't forget to use a new terminal session after updating `.bashrc`. You're changes will only effect new terminals.
Tue, 21 Dec 2021 15:03:20 GMT
@norman137 says
FYI: Updated the sample code -- forgot to copy a line for the java path. Cordova tries it‘s best to find these paths automatically but it definitely isn’t perfect. Much more reliable to just explicitly set this stuff based on your own environment.
Tue, 21 Dec 2021 15:13:37 GMT
@leo.skrilax91 says
Thanks very much !