2013-04-01 177 views
0

我試圖預編譯戲1.2.5項目時,我有這樣的錯誤:播放框架CompilationException

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) 

的driverResume場是公開的,可見的驅動程序類。

我在不同的計算機上用jdk 1.6.0試過,我總是得到相同的異常。

有誰知道如何獲得關於預編譯過程,編譯器邏輯的更多信息,或者已經遇到這種問題?

+0

你可以發佈'Drivers.java'的一些部分嗎?也就是說,你在哪裏定義'driverResume',類聲明和錯誤發生的地方(最好是整個控制器方法)。 – Todd

+0

driverResume的類型是什麼?該類型是否有編譯器錯誤? –

回答

0

看起來這可能是一個問題,你錯誤地閱讀編譯錯誤。編譯器正在抱怨Drivers類,並且您說該字段在Driver(不是Drivers)類中是公共的。

難道這是問題嗎?