2

我目前正在尝试在 Eclipse 上设置 playn 以在 android 上制作游戏我按照此处的安装步骤操作:http: //0-code.google.com.precise.petronas.com.my/p/playn/wiki/入门

我安装了 Android 开发工具和 Maven natives 插件,甚至完成了所有 android 特定步骤,包括添加与 Android Maven 插件兼容的 Maven 安装(在我的例子中是 Maven 3.0.4)。

我导入了示例文件并尝试为 android 运行 playn 展示,这就是我得到的:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Showcase Android 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
    Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/plugins/maven-surefire-plugin/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/plugins/maven-jar-plugin/maven-metadata.xml
Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
Downloading: http://forplay.googlecode.com/svn/mavenrepo/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/maven-metadata.xml
Downloading: https://oss.sonatype.org/content/repositories/snapshots/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/maven-metadata.xml
Downloading: http://forplay.googlecode.com/svn/mavenrepo/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/playn-showcase-core-1.0-SNAPSHOT.pom
Downloading: https://oss.sonatype.org/content/repositories/snapshots/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/playn-showcase-core-1.0-SNAPSHOT.pom
[WARNING] The POM for com.googlecode.playn:playn-showcase-core:jar:1.0-SNAPSHOT is missing, no dependency information available
Downloading: http://forplay.googlecode.com/svn/mavenrepo/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/playn-showcase-core-1.0-SNAPSHOT.jar
Downloading: https://oss.sonatype.org/content/repositories/snapshots/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/playn-showcase-core-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.687s
[INFO] Finished at: Tue Jun 12 00:05:36 PDT 2012
[INFO] Final Memory: 10M/109M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project playn-showcase-android: Could not resolve dependencies for project com.googlecode.playn:playn-showcase-android:apk:1.0-SNAPSHOT: Could not find artifact com.googlecode.playn:playn-showcase-core:jar:1.0-SNAPSHOT in forplay-legacy (http://forplay.googlecode.com/svn/mavenrepo) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

所以显然我缺少 com.googlecode.playn:playn-showcase-core:jar:1.0-SNAPSHOT 的 POM。我该如何解决这个问题?

4

2 回答 2

0

尝试从项目的顶级目录而不是某个子目录运行 Maven 命令。在某处读到这个。Maven似乎很愚蠢。对我来说,它使它工作。

于 2012-06-16T18:05:05.347 回答
0

好的。在对您的问题写完最后一条评论后,我想出了解决方案:

  • 右键单击 playn-showcase:运行方式 -> Maven 构建...
  • 在编辑配置窗口集上:
    • 目标:集成测试
    • 简介:安卓

我在构建 html 时遇到问题,但我得到的错误是一样的,所以在我的情况下,解决方案是在 Profiles 下设置html 。

于 2012-07-27T14:14:49.603 回答