嘗試使用greendao進行開發一個app玩,使用android studio 開發android
IDE中看到gradle卡在了下載greendao依賴的地方。app
如何解決?maven
結果發現gradle.properties中設置了代理,相似下面內容:gradle
systemProp.https.proxyPort=10080 systemProp.http.proxyHost=127.0.0.1 systemProp.https.proxyHost=127.0.0.1 systemProp.http.proxyPort=10080
應是以前加上去的。刪掉。ui
即在 build.gradle 中,將:url
buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } }
修改成:spa
buildscript { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public' } } }