2014-06-11 51 views
0

我在我的項目中使用FreshPlanet KeyboardSize ANE。我已成功添加到我的項目中,但是當我運行時ANE擴展上下文null

MeasureKeyboard.getInstance().setKeyboardAdjustNothing(); 

我收到以下錯誤消息。

ArgumentError: Error #3500: The extension context does not have a method with the name setKeyboardAdjustNothing. at flash.external::ExtensionContext/_call() at flash.external::ExtensionContext/call() at com.freshplanet.ane.KeyboardSize::MeasureKeyboard/setKeyboardAdjustNothing()e

我該如何解決這個問題?

謝謝。

+0

你在設備上遇到這個錯誤嗎?或者當你在電腦上測試電影? –

+0

我進入了設備和adt.exe。我正在使用Intellij IDEA。 – berkayk

+0

我認爲這可能是ANE中的一個錯誤。我查看了com.freshplanet.ane.KeyboardSize源文件,我不認爲它創建了正確的上下文。它爲「com.freshplanet.KeyboardSize」而不是「com.freshplanet.ane.KeyboardSize」創建擴展上下文。您可以通過嘗試調用MeasureKeyboard.getInstance() –

回答

0

確保您的src和bin-debug文件夾中的Application-app.xml中包含的NAME_OF_THE_EXTENSION_ID標記與ANE的源代碼中的ExtensionContext.createExtensionContext(NAME_OF_THE_EXTENSION_ID,null)中正在調用的內容完全匹配。如果它們不匹配,則無法在初始化中設置外部上下文。在類聲明之前,它也應該與RemoteClass描述符中的別名相匹配。我希望這是有用的信息。

0

在我的情況下,發生的事情是MSVCR(微軟visual C++再分配)丟失,這是運行C++代碼所必需的。
由於擴展中的代碼無法運行,應用程序無法找到ANE中包含的任何功能。
確保ANE的代碼可以通過編寫日誌或獨立運行一些示例本地代碼來運行。