Ionic 3 deploy to device, set android_home

前端 未结 1 897
广开言路
广开言路 2021-01-29 02:39

I do install android studio on ubuntu, and try to deploy to device an Ionic 3 app.

It fails saying no ANDROID_HOME was found :

Failed to find \'ANDROID_H         


        
相关标签:
1条回答
  • 2021-01-29 02:59

    First of all you need to add two paths for run ionic app in real device. ANDR0ID_HOME and GRADLE_HOME, and for that you need to open your environment file that is in etc folder, or try this command

    sudo -H gedit /etc/environment
    

    after fire this command, gedit is open, set your ANDROID_HOME path like,

    ANDROID_HOME="/home/android/Sdk/"

    and same like this you need to set GRADLE_HOME path or you also paste it into the PATH variable with ; seperator.

    In GRADLE_HOME variable you need to provide the gradle path from the android-studio folder

    save it and logged out after logged in your path is set.

    After Logged in check into your terminal that path is set or not, by typing this command

    echo $ANDROID_HOME
    echo $PATH
    
    0 讨论(0)
提交回复
热议问题