I can’t set correct the environment variables for android to use Ionic

Asked

Viewed 184 times

0

I’m starting in mobile and I’m doing the setup for Ionic. Well my difficulty is being on time to run sudo cordova run android who returns me:

  Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined
  (recommended setting) ANDROID_HOME=/usr/lib/android-sdk (DEPRECATED)
  Could not find an installed version of Gradle either in Android
  Studio, or on your system to install the gradle wrapper. Please
  include gradle in your path, or install Android Studio

My bashrc is like this:

export ANDROID_SDK_ROOT=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/emulato

It may be that I am forgetting some other configuration or even doing it in a wrong place, I would like your help. if anyone has any tips or even step by step would appreciate!

  • at first ANDROID_SDK_ROOT is configured correctly... can also try an export ANDROID_SDK_ROOT=~/Android/Sdk . Anyway, the easiest way to do this setup is by installing Android Studio because it already installs everything... You have JDK configured?

  • @brenodiogo yes yes, but today I’m going to do it again. I didn’t do it these days.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.