Skip to content

Trouble with Android sdk Home variable #12

@crisefd

Description

@crisefd

Every time a use the command ionic, It says: "/bin/sh: 1 Cordova permision denied"

So I have to use sudo to execute. The problem is that when building the app

sudo ionic build android

returns

ERROR building one of the platforms: 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.
You may not have the required environment or OS to build this project
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.

So I checked the variable
echo $ANDROID_HOME
returns /opt/android-sdk

I tried giving permision to cordova with
sudo chown -R $(whoami) $HOME/.cordova

And also giving full permision to directories:

sudo chmod -R 777 /opt/android-sdk
sudo chmod -R 777 /opt/node/
sudo chmod -R 777 $HOME/.cordova

And no luck

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions