2012-06-12 167 views
2

我目前正試圖建立在Eclipse上playn使遊戲在Android playn,展示功能的Android我也跟着安裝步驟在這裏:http://0-code.google.com.precise.petronas.com.my/p/playn/wiki/GettingStarted我似乎無法在Eclipse中運行

我安裝了Android開發的東西和Maven原生插件,我甚至做了所有的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一個POM:playn-展示-core:罐:1.0快照。我該如何解決這個問題?

+0

我和普通的Java版本有同樣的問題,我完全按照步驟操作。 – phpscriptcoder

+0

這裏同樣的問題。 – Ezequiel

+0

順便說一下,這隻發生在從月食到我。從命令行我可以很好地運行playn-samples/showcase文件夾並執行mvn3 -Phtml集成測試 – Ezequiel

回答

0

嘗試從項目的頂部目錄而不是某個子目錄運行Maven命令。 讀這個地方。 Maven似乎很愚蠢。對我來說,它使它工作。

0

好的。對您的問題寫在最後的評論後,我想出瞭解決方案:

  • 上playn,展示右鍵:運行方式 - > Maven構建...
  • 在編輯配置窗口中設置:
    • 目標:集成測試
    • 概況:安卓

我遇到了構建html的問題,但是我得到的錯誤是相同的,所以在我的情況下,解決方案在Profiles中設置了html