You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix compilation errors for android-chip-tool and java-matter-commissioner (project-chip#37346)
* Fix compilation errors for android-chip-tool and java-matter-commissioner
- Corrected logging statement syntax in `AndroidLogDownloadFromNode.cpp`
- Fixed type casting issue for `jlong jremoteNodeId`
- Resolved incorrect pointer dereference causing a misplaced operation in `OnTransferCallback`
- Updated type casting for `msg_length` in `CHIPP256KeypairBridge.cpp` to use `jsize` instead of `uint32_t`
- Adjusted JNI function call to use `static_cast<jsize>(msg_length)`
These changes ensure compatibility with JNI and address type
inconsistencies that were causing build failures.
Testing:
```bash
export PATH=$PATH:/opt/kotlin-compiler-1.8.0/bin
export ANDROID_HOME=/opt/Android/sdk/
export ANDROID_NDK_HOME=/opt/Android/sdk/ndk/23.2.8568313
export JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home
export JAVA_PATH=/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home
sed 's/ -XX:MaxPermSize=2048m//' examples/android/CHIPTool/gradle.properties > examples/android/CHIPTool/gradle.properties.new && mv examples/android/CHIPTool/gradle.properties.new examples/android/CHIPTool/gradle.properties
source scripts/activate.sh
./scripts/build/build_examples.py --target android-arm64-chip-tool --target darwin-arm64-java-matter-controller build
```
* fix: Cast GetFabricIndex() return value to jint in AndroidLogDownloadFromNode
The change adds an explicit static cast to convert the FabricIndex
return value to jint type when assigning to jFabricIndex variable,
maintaining type safety in the JNI interface layer.
0 commit comments