0
當我從Flash開發應用程序時,無論是在調試還是發佈中,一切都很好。AS3 AIR - 包裝時出現黑屏
應用程序打包並安裝後,我只是在運行時出現黑屏。
但是,如果我將一個'調試'文件添加到applicationDirecty\META-INF\AIR\debug
應用程序正常運行。
這可能是什麼原因造成的?如何解決?
當我從Flash開發應用程序時,無論是在調試還是發佈中,一切都很好。AS3 AIR - 包裝時出現黑屏
應用程序打包並安裝後,我只是在運行時出現黑屏。
但是,如果我將一個'調試'文件添加到applicationDirecty\META-INF\AIR\debug
應用程序正常運行。
這可能是什麼原因造成的?如何解決?
調試實用程序似乎導致發佈版本中的問題...刪除對此的調用解決了問題。
/** Gets the name of the function which is calling */
public function Log(prefix:String = "", suffix:String = "", params:* = null):void
{
var error:Error = new Error();
var stackTrace:String = error.getStackTrace(); // entire stack trace
var startIndex:int = stackTrace.indexOf("at ", stackTrace.indexOf("at ") + 1); //start of second line
var endIndex:int = stackTrace.indexOf("()", startIndex); // end of function name
var lastLine:String = stackTrace.substring(startIndex + 3, endIndex);
var functionSeperatorIndex:int = lastLine.indexOf('/');
var ClassSeperatorIndex:int = lastLine.indexOf(':');
var objectName:String = lastLine.substring(ClassSeperatorIndex+2, functionSeperatorIndex);
var functionName:String = lastLine.substring(functionSeperatorIndex + 1, lastLine.length);
trace(prefix +" " + "[" + objectName + "]" + " > " + functionName + " " + suffix);
}
開放和run.bat文件替換
set OPTIONS=-connect %DEBUG_IP%
與
set DEBUG_IP=%DEBUG_IP%
仔細檢查你把發行(非調試)SWF的AIR包。此外,如果您剛剛升級到AIR 3.0,請嘗試[回滾](http://kb2.adobe.com/cps/853/cpsid_85304.html)以查看是否有所作爲。 AIR3在某些系統上導致問題。 –
它似乎是一個SQLite數據庫問題... – davivid