Repository navigation
Fix android test app build and startup crash - #48
Merged
Merged
Conversation
- add setka dependency to the app module: it is an implementation dependency of the ruisapp library module, so its headers and static lib were missing from the app's native bundle and probe_server.cpp failed to compile - add INTERNET permission to the app manifest: the test app starts a TCP probe server on port 12555, and without the permission Android denies socket() creation, crashing the app at startup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes for the android test app (Gradle build in
build/android):Missing setka dependency in the app module —
ruisapp/build.gradledeclaresio.github.cppfw:setkaasimplementation, so it does not propagate to the:appmodule. The native-aar bundle for the app therefore lacked setka's headers andlibsetka.a, andsrc/ruisapp/probe_server.cppfailed to compile (fatal error: 'setka/init_guard.hpp' file not found). Addedimplementation 'io.github.cppfw:setka:+'toapp/build.gradle.Missing INTERNET permission — the test app's
main.cppstarts the TCP probe server on port 12555. Withoutandroid.permission.INTERNETin the manifest, Android deniessocket()with Operation not permitted, and the app crashes at startup with an uncaughtstd::system_errorinANativeActivity_onCreate. Added the permission toapp/src/main/AndroidManifest.xml.Verified:
./gradlew :app:assembleDebugbuilds for all ABIs; installed and launched on a Fairphone 5 (Android 15) — app runs, no crash.