- C++ 50.7%
- Shell 40.6%
- GLSL 5.7%
- CMake 3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| app | ||
| gradle/wrapper | ||
| scripts | ||
| .gitignore | ||
| .gitmodules | ||
| build.gradle | ||
| compile_commands.json | ||
| gradle.properties | ||
| gradlew | ||
| README.md | ||
| settings.gradle | ||
exataire – C++ Android app with raylib
Prerequisites
- Android Studio (Flamingo or newer) or command-line tools
- Android SDK API 24+
- Android NDK r21+
- CMake 3.22.1+
Project structure
exataire/
├── app/
│ ├── build.gradle # Android module config + CMake wiring
│ ├── proguard-rules.pro
│ └── src/main/
│ ├── AndroidManifest.xml # NativeActivity, OpenGL ES 3 feature
│ ├── cpp/
│ │ ├── CMakeLists.txt # Builds libexataire.so, links raylib
│ │ ├── main.cpp # Entry point (standard main())
│ │ ├── include/ # Your headers
│ │ └── raylib/ # raylib source (submodule – see below)
│ └── res/values/strings.xml
├── build.gradle
├── settings.gradle
├── gradle.properties
└── gradle/wrapper/gradle-wrapper.properties
Adding raylib
raylib is expected at app/src/main/cpp/raylib/. Add it as a Git submodule:
git init
git submodule add https://github.com/raysan5/raylib.git app/src/main/cpp/raylib
Or clone it manually:
git clone https://github.com/raysan5/raylib.git app/src/main/cpp/raylib
Build
Android Studio
- Open the project root in Android Studio.
- Let Gradle sync finish.
- Build > Make Project, or run on a device/emulator.
Command line
./gradlew assembleDebug
# APK will be at app/build/outputs/apk/debug/app-debug.apk
Install on device
adb install app/build/outputs/apk/debug/app-debug.apk
Signing key (release builds)
Release APKs must be signed. The build reads signing credentials from a
keystore.properties file at the project root (never commit this file).
1. Generate a keystore
keytool -genkeypair \
-v \
-keystore exataire-release.jks \
-alias exataire \
-keyalg RSA \
-keysize 2048 \
-validity 10000
You will be prompted for a keystore password, key password, and certificate
details. Store the resulting exataire-release.jks somewhere safe outside the
repo.
2. Create keystore.properties
Create keystore.properties at the project root with the following content,
replacing values with your own:
storeFile=/absolute/path/to/exataire-release.jks
storePassword=your_keystore_password
keyAlias=exataire
keyPassword=your_key_password
3. Add to .gitignore
Make sure both files are excluded from version control:
keystore.properties
*.jks
4. Build a signed release APK
./gradlew assembleRelease
# APK will be at app/build/outputs/apk/release/app-release.apk
C++ entry point
main.cpp uses the standard int main() signature. raylib's Android backend
(android_native_app_glue) bridges this to android_main automatically.
Adding your own source files
Place .cpp files under app/src/main/cpp/src/ — the CMakeLists.txt
glob-collects everything there with GLOB_RECURSE.
Assets credits
card textures by art-brickles