"ionic cordova run android" says $ANDROID_HOME is not set but it's set


#1

Ionic version: (check one with “x”)
[ x] 3.x

I’m submitting a … (check one with “x”)
[x ] bug report

Current behavior:
ionic cordova run android --device return an error:
“Error: Failed to find ‘ANDROID_HOME’ environment variable. Try setting setting it manually.
Failed to find ‘android’ command in your ‘PATH’. Try update your ‘PATH’ to include path to valid SDK directory.”

Expected behavior:
expected ionic cordova run android --device to run the app on the connected device

Steps to reproduce:
ionic cordova run android --device
or
ionic cordova run android

Other information:
echo $ANDROID_HOME : "/home/leno/Android/Sdk"
I also have $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools in my path:
echo $PATH : “/home/leno/Android/Sdk:/home/leno/flutter/bin:/home/leno/bin:/home/leno/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/leno/Android/Sdk/tools/bin/sdkmanager:/home/leno/Android/Sdk/platform-tools”

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

cli packages: (/usr/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.1.4
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.9.3
    npm  : 5.6.0 
    OS   : Linux 4.10

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro