Ionic Android build: java.lang.IllegalStateException: buildToolsVersion is not specified

后端 未结 4 1559
醉酒成梦
醉酒成梦 2021-02-19 02:23

Since today, somehow my ionic project is not longer able to build for some reason. I already tried to remove the platform and add it again, but it didn\'t work. I now almost spe

4条回答
  •  清歌不尽
    2021-02-19 03:22

    I had the same issue. I fixed it as follows:-

    Open Android studio configuration.

    Go to config>SDK Manager>Android SDK>SDK Tools and install Android SDK Build-Tools.

    Check the ANDROID_HOME variable. I am on mac, so it points to "/Users/user_name/Library/Android/sdk/"

    If not set correctly set it as follows:-

    export ANDROID_HOME="/Users/user_name/Library/Android/sdk/"

    Now build it again and it should work fine.

    PS:Getting android sdk by installing Android Studio is highly recommended than installing the sdk manually. This way you will not run into unnecessary trouble.

提交回复
热议问题