|
Building 5.2.2.0 for Android |
amarillion
Member #940
January 2001
|
I'm trying to make the leap to android. I'm trying to follow along the guide here: I'm getting to the point of actually compiling allegro for android. I've got allegro checked out from git on the 5.2.2.0 tag. Then, following the guide, I do: mkdir Build/Android cd Build/Android cmake ../.. -DANDROID_NDK_TOOLCHAIN_ROOT=$TC -DWANT_ANDROID=on -DCMAKE_BUILD_TYPE=Debug -DANDROID_TARGET=android-15 After running that I get the following warnings: -- Generating done CMake Warning: Manually-specified variables were not used by the project: ANDROID_NDK_TOOLCHAIN_ROOT ANDROID_TARGET WANT_ANDROID What am I missing here? Any idea why it is not recognizing the specified variables? edit: looks like the wiki is out of date. SiegeLord pointed me to the readme. ANDROID_NDK_TOOLCHAIN_ROOT should be specified as an environment variable, and the WANT_ANDROID is replaced with a reference to the Android toolchain. So this works: ANDROID_NDK_TOOLCHAIN_ROOT=$TC cmake ../.. -DCMAKE_TOOLCHAIN_FILE=../../cmake/Toolchain-android.cmake -DCMAKE_BUILD_TYPE=Debug -DANDROID_TARGET=android-15 make But then I run into the next problem: 1[ 8%] Built target allegro_main
2Scanning dependencies of target jar
3[ 8%] Generating allegro_activity/AndroidManifest.xml, allegro_activity/build.xml
4[ 8%] Generating allegro_activity/local.properties
5********************************************************************** 6The "android" command is deprecated.
7For manual SDK, AVD, and project management, please use Android Studio.
8For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
9********************************************************************** 10Invalid or unsupported command "update project -p . -t android-15"
11
12Supported commands are:
13android list target
14android list avd
15android list device
16android create avd
17android move avd
18android delete avd
19android list sdk
20android update sdk
21android/CMakeFiles/jar.dir/build.make:74: recipe for target 'android/allegro_activity/local.properties' failed
22make[2]: *** [android/allegro_activity/local.properties] Error 2
23CMakeFiles/Makefile2:648: recipe for target 'android/CMakeFiles/jar.dir/all' failed
24make[1]: *** [android/CMakeFiles/jar.dir/all] Error 2
25Makefile:127: recipe for target 'all' failed
26make: *** [all] Error 2
-- |
Polybios
Member #12,293
October 2010
|
You can also use this to build Allegro apps with Android Studio. It worked for me. |
amarillion
Member #940
January 2001
|
I'll give that a try. It looks like the instructions in the android readme assume older tools that are now deprecated. edit: Ok, I got it working! At least I have now a HelloWorld app running in a virtual android device. Thanks Elias! I still believe it's worth updating the android README if somebody knows how to get it compiling with a more recent toolchain. Or give instructions on how to install an older toolchain. And update the wiki. I would do it myself if I knew what the correct procedure is. -- |
Elias
Member #358
May 2000
|
The wiki is read only unfortunately. -- |
GullRaDriel
Member #3,861
September 2003
|
Who owns the wiki admin ? If it's Gideon, he asked for help on it. Or maybe Thomas ? "Code is like shit - it only smells if it is not yours" |
Elias
Member #358
May 2000
|
For what it's worth, if you want to compile yourself for some reason (to fix a bug!) here's a guide that works. To build for architectures other than armeabi-v7a, repeat all steps except use one of armeabi, x86, x86_64, arm64-v8a, mips, mips64 instead. Install JDK and Linux SDK+NDK
Compile Freetype
Compile Ogg
Compile Vorbis
Compile Allegro
-- |
|