我正在尝试将Robolectric导入我的Maven项目中:
<dependency>
<groupId>com.pivotallabs</groupId>
<artifactId>robolectric</artifactId>
<version>1.2-SNAPSHOT</version>
<scope>test</scope>
</dependency>
该部件在此处列出:
https://oss.sonatype.org/index.html#nexus-search;quick~robolectric
我尝试包含:
<repositories>
<repository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
根据这篇文章的建议,但它不能解决robolectric。