1

I got a sample of facebook connection and I tried to figure it out on it. I over covered this folder as soon as I made new project. And I even over covered the sample of facebook folder on after tutorial folder.

Every 3 of project, I've done to figure out the problem.

I changed every written version to 1.6.1 by myself and I consoled "sbt clean update reload" but it didn't work

So after that I found some solution, but not for me on this page "Unresolved Dependencies for a new play 2.0 scala project"

Virtualeyes said

'blowing away ~/.ivy2, ~/m2'

But I couldn't find 2 of them at all.

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
4

1 回答 1

1

我自己又得到了解决方案。

基于来自的样本

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

(因为它是针对版本 Play 2.0 而不是 2.0.4)

1.在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 ”的问题,那么删除 C:\play**repository\local\org.slf4j** 和 C:\play**repository\local\commons-codec 中的每个文件**

  5. 输入“sbt clean update reload ”,然后输入“play compile

  6. 它会工作的

(不要忘记Application.scala中的更改

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 版而不是最近的

于 2012-11-16T00:17:18.860 回答