Android模块编译无法找到依赖(shared_libs)

增加重采样库(libspeexresampler库)

cc_binary {
    name: "tinyplay",
    host_supported: true,  
    srcs: ["tinyplay.c"],
    shared_libs: [
        "libtinyalsa",
        "libspeexresampler",
        ],
    cflags: ["-Werror"],
    target: {
        darwin: {
            enabled: false,
        },
    },
}

编译报错日志

FAILED: out/soong/host/linux-x86/bin/tinyplay
echo "module tinyplay missing dependencies: libtinyalsaos:linux_glibc, arch:x86_64, link:shared, libspeexresampleros:linux_glibc, arch:x86_64, link:shared" && false
module tinyplay missing dependencies: libtinyalsaos:linux_glibc, arch:x86_64, link:shared, libspeexresampleros:linux_glibc, arch:x86_64, link:shared
17:02:11 ninja failed with: exit status 1

解决办法

宿主机无对应的库报错,只需编译设备端的执行文件即可,如下修改解决问题,

    host_supported: false  

你可能感兴趣的:(android,java,apache,audio,speex,重采样,嵌入式)