2012-11-09 55 views
1

我得到了一個facebook連接的示例,我試圖弄清楚它。 我在新建項目後立即覆蓋此文件夾。 我甚至覆蓋了教程文件夾後面的facebook文件夾樣本。slf4j-api的依賴性錯誤; 1.6.1

每3個項目中,我已經弄清楚了這個問題。

我每天寫的版本改爲1.6.1通過自己 我安慰「SBT乾淨的更新重裝」,但它並沒有在這一頁上工作

所以之後,我發現了一些解決方案,但不適合我 「Unresolved Dependencies for a new play 2.0 scala project

Virtualeyes

'吹走〜/ .ivy2〜/平方米'

但我可以根本找不到2個。

c:\play\connect>sbt clean update reload 

c:\play\connect>set SCRIPT_DIR=C:\play\ 

c:\play\connect>java -Xmx512M -jar "C:\play\sbt-launch.jar" clean update reload 

[info] Loading project definition from C:\play\connect\project 
[info] Set current project to FacebookConnectTestUsingPlay2 (in build file:/C:/p 
lay/connect/) 
[success] Total time: 0 s, completed 2012. 11. 10 오전 6:07:50 
[info] Updating {file:/C:/play/connect/}FacebookConnectTestUsingPlay2... 
[info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin 

[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] ::   UNRESOLVED DEPENDENCIES   :: 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j 
-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4. 
2.0.Final compile 
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-c 
odec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponent 
s#httpclient;4.1.2 compile 
[warn] :::::::::::::::::::::::::::::::::::::::::::::: 
[error] {file:/C:/play/connect/}FacebookConnectTestUsingPlay2/*:update: sbt.Reso 
lveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration no 
t found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibern 
ate#hibernate-validator;4.2.0.Final compile 
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration no 
t found in commons-codec#commons-codec;1.4: 'compile'. It was required from org. 
apache.httpcomponents#httpclient;4.1.2 compile 
[error] Total time: 10 s, completed 2012. 11. 10 오전 6:08:00 

回答

1

我自己又找到了解決方案。

基於其是從

https://github.com/pawank/Facebook-Integration-in-Play-2.0-using-scribe-library

(因爲它是爲Play版本2.0不2.0.4)

1.At plugins.sbt 更改爲addSbtPlugin樣品(「play」%sbt-plugin「%」2.0.4「)

2.在build.properties 更改爲sbt.version = 0.11.3

  1. 類型SBT
  2. 類型發揮
  3. 類型編譯(在遊戲控制檯)

  4. ,如果你與「commons-codec 「和」 org.slf4j「,然後擦除 Ç每一個文件:\播放**庫\本地\ org.slf4j **和C:\播放**庫\本地\公地編解碼器**

  5. 類型'SBT乾淨的更新重裝' 然後'戲編譯'

  6. 這是要去工作

(不要忘了改變這應用。階

lazy val config = play.Play.application().configuration() 
    val FBAppId = config.getString("fb.app.id") 
    val FBAppSecret = config.getString("fb.app.secretkey") 
    val FBAppCallback = config.getString("fb.app.callback") 

) 像我說,源爲2.0版本最近沒有一個