我正试图按照GitHub页面上的指定构建Droid,但是构建失败了。这是在Droid-Fu文件夹中运行mvn包后收到的消息。
[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知道我做错了什么吗?
发布于 2011-02-22 08:23:41
Maps JAR不在Maven Central上,因为它包含专有代码。您可以使用maven-android-sdk-部署程序从本地SDK安装轻松地安装它。
要确保您有所有的平台版本,首先运行
android update sdk --no-ui然后git clone SDK部署程序并运行。
mvn install如果您只想安装一个特定的平台版本,请使用-P <version>标志运行。
发布于 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包
希望这能有所帮助!
发布于 2011-02-17 02:01:08
错误上说谷歌地图API丢失了。你需要先安装它。您必须通过android安装它。我相信这是其中的一个附加部分。
http://code.google.com/android/add-ons/google-apis/installing.html
https://stackoverflow.com/questions/5024121
复制相似问题