Mac Android studio出现gradle sync issuess:cause connect timed out问题解决办法

时间:2024-03-20 20:26:18

Mac Android studio出现gradle sync issuess:cause connect
timed out问题解决办法

android studio版本:3.5.2
java-version版本:1.7

问题描述:创建项目后,打开activity_main.xml文档后出现android studio design editor is unavailable until a successful syns

解决办法:
1.打开android studio——Preference…——System Settings——HTTP Proxy——No proxy
Mac Android studio出现gradle sync issuess:cause connect timed out问题解决办法
Mac Android studio出现gradle sync issuess:cause connect timed out问题解决办法
2.打开Gradle Scripts——gradle properties
Mac Android studio出现gradle sync issuess:cause connect timed out问题解决办法
注释或者删除一下内容
Mac Android studio出现gradle sync issuess:cause connect timed out问题解决办法
3.打开build.gradle,添加阿里源地址,如下图所示
Mac Android studio出现gradle sync issuess:cause connect timed out问题解决办法
Mac Android studio出现gradle sync issuess:cause connect timed out问题解决办法
maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/’ }
maven { url ‘http://maven.aliyun.com/nexus/content/repositories/jcenter’ }

4.以上步骤完成后点击file——sync Project with Gradle Files,等待一定时间即可。
Mac Android studio出现gradle sync issuess:cause connect timed out问题解决办法

注:学识浅薄,如有纰漏,不吝赐教
联系方式qq:1832862770