【问题标题】:Can't add ActionBarSherlock maps plugin from Maven无法从 Maven 添加 ActionBarSherlock 地图插件
【发布时间】:2012-12-21 23:21:57
【问题描述】:

我的 Android 项目正在使用 Maven 来控制依赖项,我正在尝试使用来自 Jake Wharton 的 ActionBarSherlock 地图插件。

我已将 Jake 的 Maven 存储库添加到我的 pom.xml 文件中,并尝试使用 IntelliJ IDEA 更新按钮更新我的本地存储库,但它总是返回错误。

你能帮帮我吗?

来自 Jake Wharton 的 github 的内容:

    <!-- If you are a Maven user you can easily include the library by specifying it as a dependency: -->

    <dependency>
       <groupId>com.actionbarsherlock</groupId>
       <artifactId>plugin-maps</artifactId>
      <version><!-- LATEST PLUGIN VERSION --></version>
    </dependency>

    <!-- Since the Google Maps APIs are not available in central this plugin is deployed to Jake Wharton's personal repository. You can add it with the following: -->

    <repository>
      <id>com.jakewharton</id>
      <url>http://r.jakewharton.com/maven/release</url>
    </repository>

【问题讨论】:

  • 这是一个已发布的仓库吗?最后,它只是一个单一的类,所以你可以直接复制它并直接使用它,而不必为使用 maven 操心:github.com/JakeWharton/ActionBarSherlock-Plugin-Maps/blob/…
  • 请发布您遇到的错误。
  • 错误是“java.io.FileNotFoundException: Resource nexus-maven-repository-index.zip 不存在”
  • 我已按照您的建议将该类添加到我的项目中(还将包设置为我的项目的包),但现在我在继承自 SherlockMapActivity 的类中发现类未找到异常。

标签: android intellij-idea actionbarsherlock actionbarsherlock-map


【解决方案1】:

我已将类代码复制到我的包中,并将以下行添加到我的 AndroidManifest.xml:

    <uses-library android:name="com.google.android.maps" />

【讨论】:

    猜你喜欢
    • 2018-02-09
    • 2017-09-05
    • 2012-10-16
    • 2017-06-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-12
    • 1970-01-01
    相关资源
    最近更新 更多