1

我的Android項目正在使用Maven來控制依賴關係,我試圖使用來自Jake Wharton的ActionBarSherlock地圖插件。無法從Maven添加ActionBarSherlock地圖插件

我已經將Jake的Maven Repository添加到了我的pom.xml文件中,並嘗試使用IntelliJ IDEA Update按鈕更新我的本地存儲庫,但它總是返回一個錯誤。

你能幫我嗎?從傑克沃頓商學院的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> 
+0

那是一個發佈回購?最後,它只是一個類,所以你可以直接複製它並直接使用它,而不必費心使用它的maven:https://github.com/JakeWharton/ActionBarSherlock-Plugin-Maps/blob/master/ plugin/src/main/java/com/actionbarsherlock/app/SherlockMapActivity.java – dmon

+0

請發佈您收到的錯誤。 – prolink007

+0

錯誤是「java.io.FileNotFoundException:資源nexus-maven-repository-index.zip不存在」 –

回答

0

我已經複製類代碼到我的包,並添加下面一行到我的AndroidManifest.xml:

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