{"id":20826116,"url":"https://github.com/francescozoccheddu/androidpp","last_synced_at":"2026-04-20T18:31:54.728Z","repository":{"id":229356124,"uuid":"776522189","full_name":"francescozoccheddu/androidpp","owner":"francescozoccheddu","description":"CMake-only Android native bootstrap project","archived":false,"fork":false,"pushed_at":"2024-03-23T19:31:37.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T07:23:42.873Z","etag":null,"topics":["android","build-system","cmake","cpp","native","ndk","template-project"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/francescozoccheddu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-23T18:34:20.000Z","updated_at":"2024-03-23T19:31:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"7607edf1-3afa-496d-865e-31b153d8d516","html_url":"https://github.com/francescozoccheddu/androidpp","commit_stats":null,"previous_names":["francescozoccheddu/androidpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/francescozoccheddu/androidpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescozoccheddu%2Fandroidpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescozoccheddu%2Fandroidpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescozoccheddu%2Fandroidpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescozoccheddu%2Fandroidpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/francescozoccheddu","download_url":"https://codeload.github.com/francescozoccheddu/androidpp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francescozoccheddu%2Fandroidpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","build-system","cmake","cpp","native","ndk","template-project"],"created_at":"2024-11-17T23:08:04.735Z","updated_at":"2026-04-20T18:31:54.710Z","avatar_url":"https://github.com/francescozoccheddu.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# androidpp\n\n[CMake](https://cmake.org/)-only Android native bootstrap project.\n\nIn almost no circumstance should you torture yourself by using this build system. \nYou would certainly be happier by following the [orthodox way](https://developer.android.com/studio/projects/add-native-code), unless you, like me, are allergic to Gradle and Android Studio.\nOr, you can think of this as a proof of concept, or an elaborate puzzle.\n\nTested on Windows, MacOS and Linux, with Android build tools 35, platform 34, NDK 26, CMake 3.29 and JDK 20.\n\n## Installation\n\n1. Install the latest Java Development Kit.\n2. Install the latest Android SDK build tools, platform, platform tools, command line tools and NDK using [sdkmanager](https://developer.android.com/tools/sdkmanager) or the [Android Studio](https://developer.android.com/studio) built-in GUI.\n3. Install the latest [CMake](https://cmake.org/).\n4. Install [Ninja](https://ninja-build.org/), [Make](https://www.gnu.org/software/make/) or some other Clang-compatible build system.\n5. Set the `ANDROID_SDK_DIR` and the `JDK_DIR` environment variables (or pass them directly to CMake later).\n6. Clone this repository:\n```shell\ngit clone https://github.com/francescozoccheddu/androidpp\ncd androidpp\n```\n\n## Usage\nI suggest using [Visual Studio Code](https://code.visualstudio.com/).\n\n### Visual Studio Code\n\nThe repository comes with VS Code extension recomendations and preconfigured launch and debug tasks.\n\n### Visual Studio\n\nYou can probably get the debugger working with an old NDK by injecting a [\"Dynamic Shared Library (Android)\"](https://devblogs.microsoft.com/cppblog/debug-jni-android-applications-using-visual-c-cross-platform-mobile/) \ninto `CMakeLists.txt` with [`include_external_msproject`](https://cmake.org/cmake/help/latest/command/include_external_msproject.html),\nbut there is a limit on how much ugliness I can handle, so you'll have to deal with it on your own for now.\n\n### Command line\n\n1. Configure CMake:\n```shell\nmkdir build\ncd build\ncmake .. \n```\n2. Build:\n```shell\ncmake --build .\n```\n3. Enjoy your `signed.apk` APK file. 😁\n\n\n\u003e [!NOTE]  \n\u003e You may as well want to remove the VS Code configuration logic in `CMakeLists.txt` and the `.vscode` directory.\n\n## Targets\n\n`CMakeLists.txt` configures the following targets:\n\n- `java`: This target builds the Java code inside `android/java` into a JAR.\n- `lib`: This target builds the C++20 code inside `src` into a shared library.\n- `package`: This target packages the compiled Java and C++ code, `android/res`, `android/assets` and `android/AndroidManifest.xml` into a signed APK.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancescozoccheddu%2Fandroidpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancescozoccheddu%2Fandroidpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancescozoccheddu%2Fandroidpp/lists"}