fix(android): add -androidapi 21 flag to gomobile bind

This ensures compatibility with modern NDK versions that don't
support older Android API levels. API 21 (Android 5.0) is the
minimum supported by current NDK versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-01 00:14:52 -08:00
parent 9a4dd9729c
commit 543bee6d26
1 changed files with 2 additions and 1 deletions

View File

@ -154,7 +154,8 @@ if not exist "app\libs\tsslib.aar" (
)
:: Build the AAR (use full path to gomobile)
"!GOBIN_DIR!\gomobile.exe" bind -target=android -o "..\app\libs\tsslib.aar" .
:: Use -androidapi 21 to ensure compatibility with modern NDK
"!GOBIN_DIR!\gomobile.exe" bind -target=android -androidapi 21 -o "..\app\libs\tsslib.aar" .
if !errorlevel! neq 0 (
echo [ERROR] gomobile bind failed!
popd