Following are the minimum tested versions of the tools and libraries you need to build [MathFu][] for Android:
Prior to building:
Each [MathFu][] project for Android has an associated AndroidManifest.xml
file and jni
subdirectory. Unit tests and benchmarks directories contain projects that each build an Android package ([apk][]) which can be installed and executed on Android devices.
The following directories in the [MathFu] project contain [Android NDK][] projects:
mathfu/
mathfu/benchmarks
mathfu/unit_tests
To build a single [Android NDK][] project (without packaging the native component in an [apk][]):
ndk-build
For example, to build the matrix test for the default build configuration without generating an [apk][]:
cd mathfu/unit_tests/matrix_test/default ndk-build
To build all [Android NDK][] projects, install and run them on a device:
dependencies/fplutil/bin/build_all_android.py
For example:
cd mathfu ./dependencies/fplutil/bin/build_all_android.py
Running a sample requires the [Android Developer Tools][] ([ADT][]) plugin and the [NDK Eclipse plugin][].
ndk-build
([see above](@ref mathfu_guide_building_android_building_ndk_build)).Root Directory:
and select the project folder (e.g. mathfu/unit_tests/matrix_test/default
).To install and run a single application:
dependencies/fplutil/bin/build_all_android.py
with the -i
and -r
options.For example:
cd mathfu/unit_tests/matrix_test/default ./dependencies/fplutil/bin/build_all_android.py -i -r
To install and run all applications:
dependencies/fplutil/bin/build_all_android.py
with the -i
and -r
options.For example:
cd mathfu ./dependencies/fplutil/bin/build_all_android.py -i -r
By default, code is generated for devices that support the armeabi-v7a
ABI. Alternatively, you can generate a fat .apk
that includes code for all ABIs. To do so, override APP_ABI on ndk-build's command line.
Using ndk-build
:
ndk-build APP_ABI=all
Using fplutil
:
./dependencies/fplutil/bin/build_all_android.py -f APP_ABI=all
[MathFu]: @ref mathfu_overview [adb]: http://developer.android.com/tools/help/adb.html [ADT]: http://developer.android.com/tools/sdk/eclipse-adt.html [Android Developer Tools]: http://developer.android.com/sdk/index.html [Android NDK]: http://developer.android.com/tools/sdk/ndk/index.html [Android SDK]: http://developer.android.com/sdk/index.html [NDK Eclipse plugin]: http://developer.android.com/sdk/index.html [apk]: http://en.wikipedia.org/wiki/Android_application_package [fplutil]: http://google.github.io/fplutil [fplutil prerequisites]: http://google.github.io/fplutil/fplutil_prerequisites.html [managing avds]: http://developer.android.com/tools/devices/managing-avds.html