![](https://private-user-images.githubusercontent.com/49330580/240113858-9812c8ae-b23b-4d28-88fa-f16eab83796d.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2ODY2NDcsIm5iZiI6MTcyMTY4NjM0NywicGF0aCI6Ii80OTMzMDU4MC8yNDAxMTM4NTgtOTgxMmM4YWUtYjIzYi00ZDI4LTg4ZmEtZjE2ZWFiODM3OTZkLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDIyMTIyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY2MjllYTNkMWZkNmY5OGZlNGM1ZWRiMDE2OGYzZjA3YmIxZWE1MTAyODkwMTBmZDQzNWRiNTA1MzczODY1ZGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6MHfZggI_pAoahjT1pW32DRicdTCKuHhbutyjXrarC0)
Create config.properties
in the root project, with its
content like this (just an example on my machine):
ndk.targets = arm64-v8a-29,x86-29,armeabi-v7a-21,x86_64-29
librime-lib-dir = /home/bczhc/bin/librime-libs
librime-include-dir = /home/bczhc/open-source/trime/app/src/main/jni/librime/src
Directory structure of librime-lib-dir
:
librime-libs/
├── arm64-v8a
│ └── librime.so
├── armeabi-v7a
│ └── librime.so
├── x86
│ └── librime.so
└── x86_64
└── librime.so
You can follow this gist for the build of these libraries.
For librime-include-dir
, ensure rime_api.h
exists under the location:
~ ❯ ls /home/bczhc/open-source/trime/app/src/main/jni/librime/src/ 11:34:18
CMakeLists.txt rime rime_api.cc rime_api.h rime_levers_api.h
Then do ./gradlew asD
for debug build and ./gradlew asR
for release build.
- May crash for unknown reasons. (Not that serious, or I'll fix it...)
- Candidates won't show on Android14. (I tested Xiaomi 14 Ultra). 🤬