Android 报错android Connect to 127.0.0.1:65458 [/127.0.0.1] failed: Connection refused
解决办法:mac 用户里显示所有隐藏文件
将gradle.properties文件里的代理注释或删除后重新运行即可:
systemProp.https.proxyPort=1080
systemProp.http.proxyHost=127.0.0.1
systemProp.https.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080
新建项目报错:
1.进File-Project Structure改一下Gradle Plugin [Version]
改低一点
2.app根目录的build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
再把settings.gradle里的全部删除只留下
include ':app'
rootProject.name = "AppName"
over