【发布时间】:2015-02-18 08:41:07
【问题描述】:
我使用 Robolectric 设置了一个 Android Gradle 应用程序。
我用过这个tutorial。
似乎可行。我尝试运行测试并收到以下消息:
Downloading: org/robolectric/android-all/4.3_r2-robolectric-0/android-all-4.3_r2-robolectric-0.pom from repository sonatype at https://oss.sonatype.org/content/groups/public/
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.robolectric:android-all:pom:4.3_r2-robolectric-0' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: Connection refused: connect
Downloading: org/robolectric/android-all/4.3_r2-robolectric-0/android-all-4.3_r2-robolectric-0.pom from repository central at http://repo1.maven.org/maven2
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.robolectric:android-all:pom:4.3_r2-robolectric-0' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
Downloading: org/json/json/20080701/json-20080701.pom from repository sonatype at https://oss.sonatype.org/content/groups/public/
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.json:json:pom:20080701' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: Connection refused: connect
Downloading: org/json/json/20080701/json-20080701.pom from repository central at http://repo1.maven.org/maven2
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.json:json:pom:20080701' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
Downloading: org/ccil/cowan/tagsoup/tagsoup/1.2/tagsoup-1.2.pom from repository sonatype at https://oss.sonatype.org/content/groups/public/
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.ccil.cowan.tagsoup:tagsoup:pom:1.2' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: Connection refused: connect
Downloading: org/ccil/cowan/tagsoup/tagsoup/1.2/tagsoup-1.2.pom from repository central at http://repo1.maven.org/maven2
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.ccil.cowan.tagsoup:tagsoup:pom:1.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
Downloading: org/ccil/cowan/tagsoup/tagsoup/1.2/tagsoup-1.2.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
Downloading: org/robolectric/android-all/4.3_r2-robolectric-0/android-all-4.3_r2-robolectric-0.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
Downloading: org/json/json/20080701/json-20080701.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
Error transferring file: Connection refused: connect
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.json:json:jar:20080701' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.ccil.cowan.tagsoup:tagsoup:jar:1.2' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: Connection refused: connect
Downloading: org/json/json/20080701/json-20080701.jar from repository central at http://repo1.maven.org/maven2
Downloading: org/ccil/cowan/tagsoup/tagsoup/1.2/tagsoup-1.2.jar from repository central at http://repo1.maven.org/maven2
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.robolectric:android-all:jar:4.3_r2-robolectric-0' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: Connection refused: connect
Downloading: org/robolectric/android-all/4.3_r2-robolectric-0/android-all-4.3_r2-robolectric-0.jar from repository central at http://repo1.maven.org/maven2
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.ccil.cowan.tagsoup:tagsoup:jar:1.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
Error transferring file: Connection refused: connect
Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.robolectric:android-all:jar:4.3_r2-robolectric-0' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
[WARNING] Unable to get resource 'org.json:json:jar:20080701' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
Maven 似乎无法连接到任何 repo。
我在settings.xml 中配置了一个代理,所以它应该可以工作。
有什么想法吗?
【问题讨论】:
-
在 IntelliJ Settings -> Maven -> Repositories repo1.maven.org/maven2 今天列出并更新。索引花了很长时间..但没有错误或任何东西。所以它的索引 - >连接是成功的。我就是不明白。
-
你能把这个作为答案发布吗?
标签: android maven intellij-idea proxy gradle