Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Android build using Android Studio 3.3.1 on Windows 7

This thread is locked; no one can reply to it. rss feed Print
Android build using Android Studio 3.3.1 on Windows 7
chundermike
Member #16,629
January 2017

Hi,

I'm following the instructions in readme.md on GitHub regards building for android (https://github.com/liballeg/android), but am hitting a problem at the end of step 3...it looks like the downloaded allegro aar file is being expanded ok into a merged_assets directory in the expected place, but as soon as I include the "include(build/intermediates/merged_assets/debug/mergeDebugAssets/out/jniIncludes/allegro.cmake)" text in CMakeLists.txt, and then re-build, the merged_assets directory disappears and hence the build errors out since it can't subsequently find allegro.cmake.

I paid attention to the note in this step about AS producing the error that I am seeing, but even following your suggestion of re-building with the three lines commented out then back in again didn't solve the issue. Using a file explorer window, I can see that the contents of the intermediates directory disappears during the build process but is then re-generated. However, as mentioned, when the error causes the build to stop, there is no merged_assets directory to be seen (other directories are present, such as the merged_manifests for example). I have considered unpacking the jar file manually and placing the .so, .h etc files somewhere but am not sure where is a sensible place to put these files, and also what I need to modify to order for AS to pick them up.

I'm using Android Studio 3.3.1 with Windows 7.

Any help would be appreciated; I have raised this an an issue two weeks ago on GitHub, but with no repsonse.

Many thanks in advance,
Mike

Elias
Member #358
May 2000

I'm waiting for the day Google adds support to AAR to package native libraries, or just any recommendation how to distribute native libraries. I guess for now it's easier to just extract those separately.

Here's an Android Studio project with the AAR file inside and another copy of all the .h and .so files extracted and put in places where Android Studio's internal cmake will pick them up:

http://allegro5.org/empty_allegro_game.zip

--
"Either help out or stop whining" - Evert

chundermike
Member #16,629
January 2017

Thanks for that... much appreciated.

Mike

Go to: