0

I am using FreshPlanet KeyboardSize ANE in my project. I have successfully added to my project but when I run

MeasureKeyboard.getInstance().setKeyboardAdjustNothing();

I get the following error.

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

How can I fix this?

Thanks.

berkayk
  • 2,376
  • 3
  • 21
  • 26
  • Do you get this error on the device? Or when you test the movie on the computer? – Cristina Georgescu Jun 11 '14 at 09:59
  • I get in on both the device and the adt.exe. I am using Intellij IDEA. – berkayk Jun 11 '14 at 15:16
  • I think it might be a bug in the ANE. I looked in the com.freshplanet.ane.KeyboardSize source and I don't think it creates the right context. It creates the extension context for "com.freshplanet.KeyboardSize" instead of "com.freshplanet.ane.KeyboardSize". You could verify this by trying to call other functions on MeasureKeyboard.getInstance() – Cristina Georgescu Jun 12 '14 at 11:23
  • I have tried running all functions. When I trace MeasureKeyboard.getInstance() context is not null. Problem exists when I call any function that context. Could that be related to Intellij IDEA. – berkayk Jun 12 '14 at 14:34

2 Answers2

0

Make sure both your Application-app.xml from the src and from your bin-debug folder contain the NAME_OF_THE_EXTENSION_ID tag matching exactly what is being called in your ExtensionContext.createExtensionContext(NAME_OF_THE_EXTENSION_ID,null) inside the source code of the ANE. If they don't match you'll not be able to set the external context in the initialization. That should also match the alias from your RemoteClass descriptor before the class declaration. I hope it's helpful info.

Thiago Camargo
  • 148
  • 1
  • 6
0

In my case what happened was that MSVCR (Microsoft visual c++ redistribution) was missing which is required to run c++ code.
Because the code in the extension was not able to run, the app could not find any function included in the ANE.
Make sure the code of your ANE is able of running either by writing logs or by running some sample native code independently.

not-a-robot
  • 321
  • 1
  • 14