2017-07-28 117 views
1

當試圖將我的Android應用程序構建到APK時,構建服務器錯誤並且無法構建。然而,在模擬器的應用程序工作正常,並且錯誤,我相信這是由編譯器創建的類(這是不是其中之一是在應用程序內)Codenameone構建服務器失敗

以下是錯誤日誌: -

:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no 

previous execution, etc.). 
file or directory '/tmp/build4365298428607247775xxx/Main/src/debug/java', not found 
Compiling with JDK Java compiler API. 
/tmp/build4365298428607247775xxx/Main/src/main/java/com/<hidden this package name for privacy>/salestraining/MainStub.java:176: error: cannot find symbol 
     Display.getInstance().callSerially(new Runnable() { public void run() {i.destroy();} }); 
                       ^
    symbol: method destroy() 
    location: variable i of type Main 
Note: Some input files use or override a deprecated API. 
Note: Recompile with -Xlint:deprecation for details. 
Note: Some input files use unchecked or unsafe operations. 
Note: Recompile with -Xlint:unchecked for details. 
1 error 
:compileDebugJavaWithJavac FAILED 
:compileDebugJavaWithJavac (Thread[Daemon worker,5,main]) completed. Took 7.165 secs. 

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':compileDebugJavaWithJavac'. 
> Compilation failed; see the compiler error output for details. 

回答

1

您從主類中刪除了destroy()回調方法。主類應包括4種不會拋出異常的方法:

public void init(Object) {} 
public void start() {} 
public void stop() {} 
public void destroy() {}