Droid-Fu 构建错误

发布于 2024-10-17 16:06:08 字数 1665 浏览 2 评论 0原文

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

[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

知道我可能做错了什么吗?

I am trying to build Droid-Fu as specified on the GitHub page but the build is failing. Here is the message which I got after running mvn package inside the Droid-Fu folder

[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

Any idea what I may be doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

叶落知秋 2024-10-24 16:06:08

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

只需在以下命令中将 path-to-android-sdk 替换为您的基本目录

mvn install:install-file -DgroupId= com.google.android.maps -DartifactId=maps -Dversion=9_r1 -Dpackaging=jar -Dfile=android-sdk 路径/add-ons/addon_google_apis_google_inc_9/libs/maps.jar

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

希望这有帮助!

I had the same problem. The newer versions of the Android SDK have shifted directories slightly. You have to point maven at the correct path for the Google Maps jar version 9.

Just replace path-to-android-sdk with your base directory in the following command

mvn install:install-file -DgroupId=com.google.android.maps -DartifactId=maps -Dversion=9_r1 -Dpackaging=jar -Dfile=path-to-android-sdk/add-ons/addon_google_apis_google_inc_9/libs/maps.jar

Then you want to execute the following command to build the droid-fu jar:
mvn package

Hope this helps!

人间不值得 2024-10-24 16:06:08

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

要确保您拥有所有平台版本,请先运行

android update sdk --no-ui

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

mvn install

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

The Maps JAR is not on Maven Central, since it contains proprietary code. You can use the maven-android-sdk-deployer to easily install it from your local SDK installation.

To make sure that you have all platform versions, first run

android update sdk --no-ui

Then git clone the SDK deployer and run

mvn install

If you only want to install one specific platform version, run with the -P <version> flag.

往日 2024-10-24 16:06:08

该错误表示缺少 Google 地图 API。您需要先安装它。您必须通过 Android UI 安装它。我相信它是附加组件之一。

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

The error said the Google map API is missing. You need to install it first. You have to install that through the android UI. I believe it is one of the add-ons.

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

听闻余生 2024-10-24 16:06:08

我在编译 droid-fu 时遇到了类似的问题,并在 Google 上搜索解决方案。就我而言,帮助启动

android update sdk

命令没有 --no-ui 选项。然后我看到一些谷歌插件根本没有安装。所以安装了它们,问题就消失了。

I had similar problem compiling droid-fu and Googled around for solution. In my case helped launching

android update sdk

command without --no-ui option. Then I saw some Google addons were not installed at all. So installed them and problem went away.

时光沙漏 2024-10-24 16:06:08

我使用了 maven-android-sdk-deployer “直接从本地安装使用 Maven 和 Android Maven 插件构建 Android 应用程序所需的库 Android SDK 安装"

(下载为 zip,解压到临时文件夹,运行“mvn install”[必须设置 EnvVars]

) android项目运行成功,但我使用了Maps API 8_r2:

<dependency>
    <groupId>com.google.android.maps</groupId>
    <artifactId>maps</artifactId>
    <version>8_r2</version>
    <scope>provided</scope>
</dependency>

I´ve used the maven-android-sdk-deployer "to install the libraries necessary to build Android applications with Maven and the Android Maven Plugin directly from your local Android SDK installation"

(download as zip, unzip into a temporary folder, run "mvn install" [EnvVars must be set])

After this the maven build of the android project runs successful, but i used Maps API 8_r2:

<dependency>
    <groupId>com.google.android.maps</groupId>
    <artifactId>maps</artifactId>
    <version>8_r2</version>
    <scope>provided</scope>
</dependency>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文