Gradle build errors after updating Android Studio

前端 未结 11 2216
无人共我
无人共我 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:30

    i have had the Same issue with running Android-Studio on windows XP. After the Update it kept giving me the same error of Gradle: A problem occurred evaluating root project. so what i had to do is:

    1- make sure you know where your android studio directory is in my case it was C:\Documents and Settings\UserName\Local Settings\Application Data\Android\android-studio\sdk

    2- open the project root directory

    3- locate the local.properties file and open it in a text editor notepad did it for me

    4- change the sdk.dir="add your SDK directory here without the quotations" and make sure you use double instead of one on each separator sdk.dir=C:\\\Documents and Settings\\\UserName\\\Local Settings\\\Application Data\\\Android\\\android-studio\\\sdk

    5- Rebuild your project

    That was the only way it worked for me

提交回复
热议问题