2

The cordova requirements showing me the following error:

Java JDK: installed 1.8.0
Android SDK: not installed 
'ANDROID_HOME' environment variable is set to non-existent path: /android-sdk-linux/tools
Try update it manually to point to valid SDK directory.
Android target: not installed 

However, when I use this command: cordova platform version android I see the below:

Installed platforms:
  android 7.0.0
Available platforms: 
  browser ~5.0.1
  ios ~4.5.4
  osx ~4.0.1
  windows ~5.0.0
  www ^3.12.0

I can't understand whether I've installed the Android SDK in my local machine?

Also, how can I set the "ANDROID_HOME" environment variable correctly through terminal (assume that I'm in /var/www/html/cordova1$)?

[cordova1 is my project name]

Furthermore, how can I install the "Android target"?

Need your suggestion. My OS is Ubuntu 16.x.

  • Possible duplicate of [Cordova: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID\_HOME environment variable](https://stackoverflow.com/questions/42645285/cordova-android-sdk-not-found-make-sure-that-it-is-installed-if-it-is-not-at) – Cedric Ipkiss Jul 19 '18 at 12:30
  • @che-azeh My question is How can I check in ubuntu that android sdk is installed? Because cordova platform version android command showing the android version and at the same time "cordova requirements" is saying that android SDK is not installed. I'm in a strange situation. – Niladri Banerjee - Uttarpara Jul 19 '18 at 12:32
  • This can help you i think : https://github.com/meteor/meteor/issues/8464#issuecomment-288112504 – Enzo B. Jul 19 '18 at 13:27

1 Answers1

0

First purge the package:

sudo apt-get purge android-sdk

Then fix any remaining issues:

sudo dpkg --configure -a   or
sudo apt-get update

Run the installation again:

sudo apt-get install android-sdk

[from : https://askubuntu.com/questions/652843/errors-were-encountered-while-processing-android-studio]