Error:SDK location not found. Define location with sdk.dir in the local.properties file or with an A

今天在导入微信的第三方登录相关的Demo工程时遇到了这个问题:
Error:SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
在StackOverflow上面看了答案:
https://stackoverflow.com/questions/19794200/gradle-android-and-the-android-home-sdk-location
最终使用了Hiren Patel的答案帮助了我:也就是项目中没有setting.gradle,在知道了这个思路之后去项目类面看了一下,才发现是自己导入错了项目……应该是将整个解压文件导入,而不是将app导入。

所以,遇到这个问题的时候可以查看setting.gradle文件是一个解决思路。

猜你喜欢

转载自blog.csdn.net/github_35186068/article/details/78746447