我将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