Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro in Android Studio on Windows 10

This thread is locked; no one can reply to it. rss feed Print
Allegro in Android Studio on Windows 10
Matias Persson
Member #15,093
May 2013

Hi I am linking directly to this thread
https://www.allegro.cc/forums/thread/617773

more specifically to member elias.
can you tell us what you did to make it work ? I followed the android guide on github, but that did not seem to work and had the exact same problem as above thread. It would be nice if you could shed some light on what you did to make the project in Android Studio :))
Reason why I'm asking is because I cannot make your empty project run in Android Studio.

Elias
Member #358
May 2000

Look at the .zip file in that other thread, that has the files manually placed. Below is the contents of it.

Basically what you do is, start Android Studio, create an empty NDK project. It will create the below structure for you. Then place the Allegro include files somewhere (app/src/main/cpp/jni/{platform}/include is a place that works for me) and place the native Allegro libraries somewhere (app/src/main/cpp/jni/lib/{platform} works).

And finally place the Allegro .aar library into the libs folder, like with any Android library.

The weird part is that the .aar already has a jni folder, but Google failed to have Android Studio pick that up automatically. The above build instructions were meant to temporarily work around that by using paths under the build/ folder, until Google fixes that oversight. Seems they still did not fix it... so until they do I'd just use the above .zip file instead.

empty_allegro_game
empty_allegro_game/android
empty_allegro_game/android/gradle.properties
empty_allegro_game/android/app
empty_allegro_game/android/app/src
empty_allegro_game/android/app/src/main
empty_allegro_game/android/app/src/main/java
empty_allegro_game/android/app/src/main/java/com
empty_allegro_game/android/app/src/main/java/com/example
empty_allegro_game/android/app/src/main/java/com/example/emptyallegroapp
empty_allegro_game/android/app/src/main/java/com/example/emptyallegroapp/MainActivity.java
empty_allegro_game/android/app/src/main/AndroidManifest.xml
empty_allegro_game/android/app/src/main/cpp
empty_allegro_game/android/app/src/main/cpp/jni
empty_allegro_game/android/app/src/main/cpp/jni/armeabi-v7a
empty_allegro_game/android/app/src/main/cpp/jni/armeabi-v7a/include
empty_allegro_game/android/app/src/main/cpp/jni/armeabi-v7a/include/allegro5
empty_allegro_game/android/app/src/main/cpp/jni/armeabi-v7a/include/allegro5/...
empty_allegro_game/android/app/src/main/cpp/jni/x86_64
empty_allegro_game/android/app/src/main/cpp/jni/x86_64/include
empty_allegro_game/android/app/src/main/cpp/jni/x86_64/include/allegro5
...
empty_allegro_game/android/app/src/main/cpp/jni/lib
empty_allegro_game/android/app/src/main/cpp/jni/lib/armeabi-v7a
empty_allegro_game/android/app/src/main/cpp/jni/lib/armeabi-v7a/liballegro.so
empty_allegro_game/android/app/src/main/cpp/jni/lib/armeabi-v7a/liballegro_image.so
...
empty_allegro_game/android/app/src/main/cpp/jni/lib/x86_64
empty_allegro_game/android/app/src/main/cpp/jni/lib/x86_64/liballegro.so
...
empty_allegro_game/android/app/src/main/cpp/jni/allegro.cmake
empty_allegro_game/android/app/src/main/cpp/src
empty_allegro_game/android/app/src/main/cpp/src/main.cpp
empty_allegro_game/android/app/src/main/cpp/CMakeLists.txt
empty_allegro_game/android/app/src/main/res
empty_allegro_game/android/app/src/main/res/layout
empty_allegro_game/android/app/src/main/res/layout/activity_main.xml
empty_allegro_game/android/app/src/main/res/drawable
empty_allegro_game/android/app/src/main/res/drawable/ic_launcher_background.xml
empty_allegro_game/android/app/src/main/res/mipmap-xxhdpi
empty_allegro_game/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
empty_allegro_game/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
empty_allegro_game/android/app/src/main/res/mipmap-xhdpi
empty_allegro_game/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
empty_allegro_game/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
empty_allegro_game/android/app/src/main/res/mipmap-anydpi-v26
empty_allegro_game/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
empty_allegro_game/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
empty_allegro_game/android/app/src/main/res/drawable-v24
empty_allegro_game/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
empty_allegro_game/android/app/src/main/res/mipmap-xxxhdpi
empty_allegro_game/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
empty_allegro_game/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
empty_allegro_game/android/app/src/main/res/mipmap-hdpi
empty_allegro_game/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
empty_allegro_game/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
empty_allegro_game/android/app/src/main/res/values
empty_allegro_game/android/app/src/main/res/values/styles.xml
empty_allegro_game/android/app/src/main/res/values/colors.xml
empty_allegro_game/android/app/src/main/res/values/strings.xml
empty_allegro_game/android/app/src/main/res/mipmap-mdpi
empty_allegro_game/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
empty_allegro_game/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
empty_allegro_game/android/app/src/androidTest
empty_allegro_game/android/app/src/androidTest/java
empty_allegro_game/android/app/src/androidTest/java/com
empty_allegro_game/android/app/src/androidTest/java/com/example
empty_allegro_game/android/app/src/androidTest/java/com/example/emptyallegroapp
empty_allegro_game/android/app/src/androidTest/java/com/example/emptyallegroapp/ExampleInstrumentedTest.java
empty_allegro_game/android/app/src/test
empty_allegro_game/android/app/src/test/java
empty_allegro_game/android/app/src/test/java/com
empty_allegro_game/android/app/src/test/java/com/example
empty_allegro_game/android/app/src/test/java/com/example/emptyallegroapp
empty_allegro_game/android/app/src/test/java/com/example/emptyallegroapp/ExampleUnitTest.java
empty_allegro_game/android/app/app.iml
empty_allegro_game/android/app/build.gradle
empty_allegro_game/android/app/.gitignore
empty_allegro_game/android/app/libs
empty_allegro_game/android/app/libs/allegro5-release-5.2.5.0A.aar
empty_allegro_game/android/app/proguard-rules.pro
empty_allegro_game/android/local.properties
empty_allegro_game/android/gradlew.bat
empty_allegro_game/android/settings.gradle
empty_allegro_game/android/android.iml
empty_allegro_game/android/gradle
empty_allegro_game/android/gradle/wrapper
empty_allegro_game/android/gradle/wrapper/gradle-wrapper.jar
empty_allegro_game/android/gradle/wrapper/gradle-wrapper.properties
empty_allegro_game/android/build.gradle
empty_allegro_game/android/.gitignore
empty_allegro_game/android/gradlew

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

Go to: