• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Native Extension ClassNotFound

New Here ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

Hi,

I created a clean air native extension with a simple function that starts an activity from within the ANE, 'DumbActivity'. It worked.

However, after having DumbActivity extend YouTubeFailureRecoveryActivity in order to start using the YouTube API 3.0, I got a ClassNotFoundException on DumbActivity when I run the ANE.

Worth mentioning that when I run the code as a native android app, it runs properly, and I can use YouTube abilities. Also checked, the DumbActivity class is included in the Jar.

Is that some sort of library conflict or something?

TOPICS
Development

Views

874

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Dec 08, 2015 Dec 08, 2015

Hi,

Have you created a platform-options-android.xml for android to include external jar(Youtube API), it should be like:

<platform xmlns="http://ns.adobe.com/air/extension/4.0">
  
<packagedDependencies>
  
<packagedDependency>youtubeapi.jar</packagedDependency>
  
</packagedDependencies>
  
<packagedResources>
  
</packagedResources>
</platform>

You need to specify the name of the Youtube jar file name inside "PackageDependency" tag.


And, The adt command to package the ANE should be like:

adt -package [Y

...

Votes

Translate

Translate
Adobe Employee ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

Hi,

Have you created a platform-options-android.xml for android to include external jar(Youtube API), it should be like:

<platform xmlns="http://ns.adobe.com/air/extension/4.0">
  
<packagedDependencies>
  
<packagedDependency>youtubeapi.jar</packagedDependency>
  
</packagedDependencies>
  
<packagedResources>
  
</packagedResources>
</platform>

You need to specify the name of the Youtube jar file name inside "PackageDependency" tag.


And, The adt command to package the ANE should be like:

adt -package [YOUR NORMAL OPTIONS] -platform Android-ARM -platformoptions platform-options-android.xml -C Android-ARM .



Please Verify.


Thanks,

Adobe AIR Team




Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

Thank you! Now what am I doing when it bugs me about 'Namespace of platform-options-android.xml should match extension namespace.' ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

Oh the version on extension.xml is 3.1. should I state it as 4?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

Yes, it should be same as platform-options-android.xml.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

Now I'm having a lot of resources problems when trying to use the ANE in the project:

Error occurred while packaging the application:

aapt tool failed:C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\strings.xml:19: error: Resource at app_version appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\strings.xml:20: error: Resource at button_install appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\strings.xml:21: error: Resource at button_exit appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\strings.xml:22: error: Resource at title_adobe_air appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\strings.xml:23: error: Resource at text_runtime_required appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\strings.xml:24: error: Resource at text_install_runtime appears in overlay but not in the base package; use <add-resource> to add.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 08, 2015 Dec 08, 2015

Copy link to clipboard

Copied

Now I'm having a lot of resources problems when trying to use the ANE in the project:

Error occurred while packaging the application:

aapt tool failed:C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res \values\strings.xml:19: error: Resource at app_version appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\ strings.xml:20: error: Resource at button_install appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\ strings.xml:21: error: Resource at button_exit appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\ strings.xml:22: error: Resource at title_adobe_air appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\ strings.xml:23: error: Resource at text_runtime_required appears in overlay but not in the base package; use <add-resource> to add.

C:\Users\AVI\AppData\Local\Temp\c3957387-2e6c-41d5-926e-dc81c5305a12\app_entry_res\values\ strings.xml:24: error: Resource at text_install_runtime appears in overlay but not in the base package; use <add-resource> to add.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 10, 2016 May 10, 2016

Copy link to clipboard

Copied

LATEST

Hey Mike, did you ever find a way around these resource packaging issues?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines