当我遇到此错误时,我正在尝试预编译 play 1.2.5 项目:
Compilation error (In /app/controllers/api/Drivers.java around line 168)
The file /app/controllers/api/Drivers.java could not be compiled.
Error raised is : driverResume cannot be resolved or is not a field
play.exceptions.CompilationException: driverResume cannot be resolved or is not a field
at play.classloading.ApplicationCompiler$2.acceptResult(ApplicationCompiler.java:246)
at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:676)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:520)
at play.classloading.ApplicationCompiler.compile(ApplicationCompiler.java:282)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:426)
at play.Play.preCompile(Play.java:593)
at play.Play.init(Play.java:299)
at play.server.Server.main(Server.java:159)
最佳答案
看起来这可能是您误读编译错误的问题。编译器提示 Drivers 类,而您说该字段在 Driver(不是 Drivers)类中是公共(public)的。
这可能是问题吗?
关于java - Play Framework CompilationException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15748595/