Error: failed to find target with hash string 'android-21'

后端 未结 6 1700
自闭症患者
自闭症患者 2021-02-13 21:03

I want to change my compileSdkVersion from 23 to 21.So I have made following changes in the build.gradle but I am getting following error.How can I resolve this?

6条回答
  •  庸人自扰
    2021-02-13 21:25

    Just check android home environment variable, it should be : path/../path/sdk and not : path/.../path/sdk/tools example: android home path is : /home/username/android/sdk you should put the following lines to .bashrc file in user home directory:

     ANDROID_HOME='/home/username/android/sdk'
     PATH="$HOME:$HOME/bin:$ANDROID_HOME/tools:$PATH"
     export ANDROID_HOME
     export PATH
    

提交回复
热议问题