Bug 13678 - Files marked as AndroidNativeLibrary in a class library project are not added to apk
Summary: Files marked as AndroidNativeLibrary in a class library project are not added...
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.8.x
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-08-01 07:47 UTC by Steve Williams
Modified: 2013-08-09 12:07 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Steve Williams 2013-08-01 07:47:45 UTC
For the MonoGame project I am trying to add some native libraries to support OpenAL on Android.  If I add these native libraries to the startup project, they are included in the apk.  However we don't want to ask everyone to add these native libraries to their game project, so we want them to be included in the MonoGame project.  If we add the native libraries to the MonoGame project, they are omitted from the apk and the app crashes because it cannot load the native library.
Comment 1 Atsushi Eno 2013-08-01 13:44:28 UTC
AndroidNativeLibrary is wrong. Use EmbeddedNativeLibrary.
Comment 2 Steve Williams 2013-08-02 07:01:16 UTC
Thanks Atsushi.  Should there be a build warning when using AndroidNativeLibrary in a class library project that the Build Action will have no effect?

Perhaps the "Using Native Libraries" documentation could be extended to include a small description of EmbeddedNativeLibrary as there is no documentation on that option other than a one liner in the 4.6 release notes that I have just found.
Comment 3 Atsushi Eno 2013-08-05 01:40:12 UTC
topgenorth: could you take a look?
Comment 4 Tom Opgenorth 2013-08-09 12:06:06 UTC
Document now specifies EmbeddedNativeLibrary instead of AndroidNativeLibrary.
Comment 5 Tom Opgenorth 2013-08-09 12:07:46 UTC
Document now specifies EmbeddedNativeLibrary instead of AndroidNativeLibrary.