我將cc_library
鏈接到android_binary
並且出現命名問題。有人能告訴我如何解決它嗎?Android二進制文件中的.so文件的名稱衝突
的cc_library
:
cc_library(
name = "native_library",
srcs = glob(["libs/**/*.so"])
)
庫目錄的內容:
libs
├── armeabi
│ ├── libSound.so
│ ├── libSec.so
│ ├── libWatch.so
│ └── libTec.so
├── armeabi-v7a
│ ├── libSound.so
│ ├── libSec.so
│ └── libWatch.so
├── x86
│ ├── libSound.so
│ ├── libSec.so
│ ├── libWatch.so
│ └── libTec.so
|—— other jars
和錯誤信息是這樣的:
ERROR: /the/path/to/BUILD:10:1: in android_binary rule //:debug_apk: Each library in the transitive closure must have a unique basename to avoid name collisions when packaged into an apk, but two libraries have the basename 'libSound.so': libs/armeabi/libSound.so and libs/armeabi-v7a/libSound.so.
...
好吧,明白了,謝謝你的迴應! – ldjhust