AS 软件调试时突然出现这个问题,网上搜索了一些资料,说关闭热点可以正常。
经测试发现关闭热点的后重启确实能正常。 但需要使用电脑热点,因此寻找其他解决方案。
经测试更新gradle 为7.0能解决(更改gradle/wrapper/gradle-wrapper.properties 将gradle-xx-all.zip改为gradle-7.0-all.zip),之后同步。
同步过程出现另外一个错误;Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository
发现用到的一个ali mave仓库不是https的,如果需要用http增加一行:
allowInsecureProtocol true
更改后变为:
maven {
allowInsecureProtocol true
url "http://maven.aliyun.com/nexus/content/repositories/releases"
}
同步后正常。