Gradle build errors after updating Android Studio

前端 未结 11 2222
无人共我
无人共我 2020-12-12 23:30

I just updated Android Studio, and now when I try to build my app, I get the following Gradle error:

Information: Compilation completed with 2 e         


        
11条回答
  •  渐次进展
    2020-12-13 00:25

    Try adding a new file in the root of your project called "local.properties" (or modify the existing one). It should contain

    sdk.dir= 
    

    followed by the path to the sdk location, in my case

    sdk.dir=/Applications/Android Studio.app/sdk
    

    I think Android Studio normally creates one automatically but says that it shouldn't be added to VCS. I put it in my .gitignore and cloned the project on my Mac which resulted in this error. Strangely before 0.1.5 it worked just fine without the file.

提交回复
热议问题