2
votes

I am trying to implement in-app billing with an Android app I am creating in Flash Builder, so I downloaded a native extension to handle this (https://github.com/pozirk/AndroidInAppPurchase). It comes with the .ane file, but when I add this the "native extensions" in the properties of my project, I get a Native Extension Error when I try to run the project that leads to a runtime VerifyError saying that the InAppPurchase class could not be found.

I assume this is because the download of the ANE did not come with a .swc file. I don't really know a lot about using native extensions or creating Flex libraries, and nothing I read anywhere is very helpful. I tried to create a new Flex library project and add the as3/InAppPurchase to the source path, but that just creates a swc file in another location from the ane file (resulting in the same error when I add the new swc file to my project's library path).

Sorry if this is a trivial problem, but I'm really stuck as to where to go from here.

2

2 Answers

0
votes

It sounds like the compiler finds the ANE definitions (as you are able to compile), but the ANE isn't included in the final app package.

Check if the native extension is selected to be packaged with the app in Project > Properties > Flex Build Packaging > Google Android, then go to the Native Extensions tab and make sure the extension is listed there and the box under Package is ticked.

0
votes

You shouldn't need a SWC file unless you are trying to use it in an old version of flash builder (i.e. 4.5). An ANE file is basically a SWC file but includes native code as well.

Are you running your project on a device or on the desktop?

Some ANE's won't provide a "default" solution to run in non-device situations which may lead to your error. Try running it on a device and see if you get the same error.