Skip to main content
Inspiring
April 24, 2015
Question

<packageName> question when building an Android ANE

  • April 24, 2015
  • 1 reply
  • 2034 views

Hi,

I'm trying to implement an external library ANE wrapper for Android.

I'm always receiving "class not found" error message in LogCat. No problem accessing native code, but when I try to access to external library functions it fails.

I've tried

External library inside Air native extension for android

How to include additional Jar in Android Native Extension for Adobe Air Mobile - Stack Overflow

Unsuccessfuly.

Reading these docs: Adobe Flash Platform * Including resources in your native extension package I think I could have a problem loading the resources and, because of that, not access to the class properly or crashing somewhere.

My platformoptions file

<platform xmlns="http://ns.adobe.com/air/extension/17.0">

    <packagedDependencies>

        <packagedDependency>my_sdk.jar</packagedDependency>

    </packagedDependencies>

  <packagedResources>

  <packagedResource>

  <packageName>com.my_sdk</packageName>

  <folderName>res</folderName>

  </packagedResource>

  </packagedResources>

</platform>

My question is, how can I know the "packageName", "res" is the folder where I copied and pasted all the resources from the external library, but the package? I've just written randomly "com.my_sdk"

Thanks!

This topic has been closed for replies.

1 reply

Nimisha1
Participating Frequently
April 26, 2015

You can find out the <packageName> if you're using any classes of third party jar in your ANE.

For example if I am using Google play services library in an ANE then the <packageName> will be com.google.android.gms.

Inspiring
April 27, 2015

Hi,

in Google Play Services case is easy, because all the services are implemented in the same package (Setting Up Google Play Services | Android Developers)

But, for example, if you are integrating Facebook sdk the packages could be

com.facebook.android

com.facebook.internal

com.facebook.model

com.facebook.widget

I know it's the firs one because it's the dependency in build.gradle file. Otherwise I don't know how I could know it.

thanks!

Nimisha1
Participating Frequently
April 27, 2015

One way to find out packageName is to decompile the jar to know its contents, there are lot of third party java decompilers present in market.