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

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

问题描述

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?

解决方案

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.

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

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