Using a library as a prebuilt library
The previous recipe described how to build an existing library
with its own build system. We obtained a compiled static library libbmp.a
of the open source libbmp
library. This recipe will discuss how to use a prebuilt library.
How to do it...
The following steps build an Android NDK application which uses prebuilt library. Note that the sample project is based on what we have done in the previous recipe. If you have not gone through previous recipe, you should do it now.
- Open the
PortingWithBuildSystem
project that you created in previous recipe. Add a Java fileMainActivity.java
under thecookbook.chapter8.portingwithbuildsystem
package. This Java file simply loads the shared libraryPortingWithBuildSystem ...
Get Android Native Development Kit Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.