2016-03-25 86 views
0

我試圖使用「激活」構建一個播放框架項目。玩!框架項目不能建立由於未解決的依賴關係

我在播放項目的根目錄輸入activator compile,我得到以下錯誤。

unresolved dependency: org.scala-lang#scala-library;2.10.6: not found  
unresolved dependency: org.scala-lang#scala-compiler;2.10.6: not found  
unresolved dependency: org.scala-sbt#launcher-interface;1.0.0-M1: not found  
unresolved dependency: jline#jline;2.13: not found  
unresolved dependency: org.scala-sbt.ivy#ivy;2.3.0  
sbt-2cc8d2761242b072cedb0a04cb39435c4fa24f9a: not found  
unresolved dependency: org.scala-sbt#serialization_2.10;0.1.2: not found  
unresolved dependency: org.scala-lang#scala-reflect;2.10.6: not found  
Error during sbt execution: Error retrieving required libraries  
Error: Could not retrieve sbt 0.13.11  
  1. 我已經加入這一行項目/ plugins.sbt文件

    Resolvers += Resolver.url("binary-sbt-plugins",url("https://dl.bintray.com/sbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns) 
    
  2. 也嘗試使用這些命令

    $ cd ~/.ivy2/cache/org.scala-lang/ 
    $ mkdir -p scala-library && cd scala-library 
    $ wget https://raw.githubusercontent.com/peterklipfel/scala_koans/master/ivyrepo/cache/org.scala-lang/scala-library/ivy-2.10.2.xml 
    $ wget https://raw.githubusercontent.com/peterklipfel/scala_koans/master/ivyrepo/cache/org.scala-lang/scala-library/ivydata-2.10.2.properties 
    $ mkdir -p jars && cd jars 
    $ wget https://github.com/peterklipfel/scala_koans/raw/master/ivyrepo/cache/org.scala-lang/scala-library/jars/scala-library-2.10.2.jar 
    
  3. 我還手動下載所需的文件將以下內容添加到project/plugins.sbt並生成文件

    resolvers += Resolver.sonatypeRepo("releases") 
    

這些都沒有成功解決這個問題。我應該提到,同一個項目可以在其他機器上成功構建。

回答

0

您提到同一個項目在別處成功構建,這表明本地常青藤資源庫需要重建。

要重建.ivy2,請將您的主文件夾中的.ivy2重命名爲其他內容,然後再次嘗試運行編譯任務。

我建議使用安裝在項目中的activator而不是全局activator。要做到這一點,運行:

./activator compile 

代替:

activator compile 
相關問題