首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Droid-Fu构建错误

Droid-Fu构建错误
EN

Stack Overflow用户
提问于 2011-02-17 01:19:27
回答 5查看 2.5K关注 0票数 3

我正试图按照GitHub页面上的指定构建Droid,但是构建失败了。这是在Droid-Fu文件夹中运行mvn包后收到的消息。

代码语言:javascript
复制
[INFO] artifact junit:junit: checking for updates from central
Downloading: http://powermock.googlecode.com/svn/repo//com/google/android/maps/maps/9_r1/maps-9_r1.jar
[INFO] Unable to find resource 'com.google.android.maps:maps:jar:9_r1' in repository powermock-repo (http://powermock.googlecode.com/svn/repo/)
Downloading: http://repo1.maven.org/maven2/com/google/android/maps/maps/9_r1/maps-9_r1.jar
[INFO] Unable to find resource 'com.google.android.maps:maps:jar:9_r1' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.google.android.maps:maps:jar:9_r1

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=com.google.android.maps -DartifactId=maps -Dversion=9_r1 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=com.google.android.maps -DartifactId=maps -Dversion=9_r1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
    1) com.github.droidfu:droid-fu:jar:1.0-SNAPSHOT
    2) com.google.android.maps:maps:jar:9_r1

----------
1 required artifact is missing.

for artifact: 
  com.github.droidfu:droid-fu:jar:1.0-SNAPSHOT

知道我做错了什么吗?

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2011-02-22 08:23:41

Maps JAR不在Maven Central上,因为它包含专有代码。您可以使用maven-android-sdk-部署程序从本地SDK安装轻松地安装它。

要确保您有所有的平台版本,首先运行

代码语言:javascript
复制
android update sdk --no-ui

然后git clone SDK部署程序并运行。

代码语言:javascript
复制
mvn install

如果您只想安装一个特定的平台版本,请使用-P <version>标志运行。

票数 3
EN

Stack Overflow用户

发布于 2011-03-01 06:50:57

我也有同样的问题。Android的新版本稍微改变了目录。您必须将maven指向Google版本9的正确路径。

只需在以下命令中用基本目录替换path-to-android-sdk

mvn安装:install- -DgroupId=com.google.android.maps -DgroupId=com.google.android.maps -DartifactId=maps -Dversion=9_r1 -Dpackaging=jar -Dpackaging=jar

然后执行以下命令来构建droid-fu jar: mvn包

希望这能有所帮助!

票数 5
EN

Stack Overflow用户

发布于 2011-02-17 02:01:08

错误上说谷歌地图API丢失了。你需要先安装它。您必须通过android安装它。我相信这是其中的一个附加部分。

http://code.google.com/android/add-ons/google-apis/installing.html

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5024121

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档