Skip to content

feat: Disable advisory-lock for Android API 26 compatibility #2399#423

Open
conanchen wants to merge 2 commits intoeclipse-zenoh:mainfrom
conanchen:android-api26-support
Open

feat: Disable advisory-lock for Android API 26 compatibility #2399#423
conanchen wants to merge 2 commits intoeclipse-zenoh:mainfrom
conanchen:android-api26-support

Conversation

@conanchen
Copy link

@conanchen conanchen commented Feb 2, 2026

🔧 Android Build Configuration Optimization

Problem: Android target platform builds fail due to incorrect platform name configuration in zenoh-java build system.

Solution: Simplify Android target platform names to standard Rust conventions and fix build configuration.

Changes Made:

  • Target Platform Names: Standardize to arm, arm64, x86, x86_64
  • Build Configuration: Update zenoh-jni/Cargo.toml for proper Android support
  • Dependency Management: Use local path dependencies for custom zenoh modifications

Impact:

  • Fixed: Android builds now succeed with proper toolchain configuration
  • Compatibility: Supports all major Android architectures (ARM, ARM64, x86, x86_64)
  • Development: Enables local development with custom zenoh modifications
  • ⚠️ Note: Requires Rust 1.85.0 toolchain and Android NDK setup

Tested On:

  • Android API 26, 28, 30 (ARM64)
  • Rust toolchain 1.85.0
  • Android NDK r25c

Build Verification:

# Before: Build failures due to platform name issues
# After: Clean builds for all Android targets
cargo build --target aarch64-linux-android --release
cargo build --target armv7-linux-androideabi --release

- Exclude transport_unixsock-stream feature to avoid syncfs dependency on Android
- Add detailed feature configuration for Android compatibility
- Switch from git dependency to local path dependency for easier testing
- Exclude transport_unixsock-stream feature to avoid syncfs dependency on Android
- Add .gitignore rules for JNI compiled libraries and Cargo config
- This allows Zenoh Java to run on Android API 26+ without syncfs issues
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

PR missing one of the required labels: {'internal', 'api-sync', 'bug', 'enhancement', 'breaking-change', 'documentation', 'dependencies', 'new feature', 'ci'}

@conanchen
Copy link
Author

@maintainers 我们已经提交了 Android API 26 兼容性修复:

这些修复解决了 syncfs 符号缺失问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant