在splay 2.3项目中编译sbt后,为什么sbt失败并出现NoClassDefFoundError:在Play 2.2.x项目中的play/Play $? [英] Why does sbt fail with NoClassDefFoundError: play/Play$ in Play 2.2.x projects after sbt compile in Play 2.3 project?

查看:181
本文介绍了在splay 2.3项目中编译sbt后,为什么sbt失败并出现NoClassDefFoundError:在Play 2.2.x项目中的play/Play $?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一旦我在2.3播放项目上运行"sbt编译",就不能再使用"sbt编译"来编译任何Play 2.2.x项目.这是我运行sbt命令时出现的错误.

Once I run 'sbt compile' on a 2.3 play project, I can't use 'sbt compile' to compile any Play 2.2.x projects anymore. This is the error when I run sbt command.

[info] Loading project definition from /Users/macbookpro/playproject/project
[error] java.lang.NoClassDefFoundError: play/Play$
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

推荐答案

我刚刚遇到了同样的问题.就我而言,我使用的是Play 2.4,但这可能是相同的原因.我偶然在我的项目目录中运行了activator ui.它创建了一个project/play-fork-run.sbt文件,该文件用于激活器支持,但是阻止了sbt直接工作.删除该文件可以解决问题,现在我可以再次使用sbt.

I just had this same issue. In my case I was using Play 2.4, but it's probably the same cause. I had run activator ui in my project directory accidentally. It created a project/play-fork-run.sbt file which is for activator support, but was preventing sbt from working directly. Deleting that file cleared up the issue and I can now use sbt again.

这篇关于在splay 2.3项目中编译sbt后,为什么sbt失败并出现NoClassDefFoundError:在Play 2.2.x项目中的play/Play $?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆