简体   繁体   English

在 android.bp 中找不到文件

[英]Can not find file in android.bp

i build a so file in Android.bp,i use the "include_dirs" to find the ".h" file,but it can not find,here is my code我在 Android.bp 中构建了一个 so 文件,我使用“include_dirs”找到“.h”文件,但找不到,这是我的代码

codeA named A.bp代号 A 命名为 A.bp

cc_library_static {name :"liba" , static_libs:['libb']}

codeB name B.bp codeB 名称 B.bp

cc_library_static {name :"libb",include_dirs:['vendor/dirb']}

there is a file named "bh" in the dir "vendor/dirb"在目录“vendor/dirb”中有一个名为“bh”的文件

when i build liba,it got error with "can not find bh",how to solve it?当我构建liba时,出现“找不到bh”的错误,如何解决? thank you谢谢你

You have to use export_include_dirs in B.bp .您必须在B.bp export_include_dirs But be sure to specify a path relative to B.bp there.但请务必在此处指定相对于B.bp的路径。

include_dirs is meant to add additional include directories that are not provided by dependent modules. include_dirs旨在添加依赖模块未提供的其他包含目录。

Note: cc_library_static will create a static library ( .a file).注意: cc_library_static将创建一个 static 库( .a文件)。 Use cc_library_shared instead if you want to have a shared library ( .so file).如果您想拥有一个共享库( .so文件),请改用cc_library_shared

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM