我正试图在Android产品分区中编译一个JNI。为此,我在Android.bp中添加了属性product_specific: true
,例如:
cc_library_shared {
name : "..."
...
shared_libs: [
"libandroidicu",
"libnativehelper",
"libcutils",
"libutils",
"liblog",
],
proprietary : false;
product_specific: true
不幸的是,在编译时我出现了以下错误:
Android.bp:1:1:依赖关系"libnativehlper;的";libTest_jni";缺少变体:
os:android,image:product.30,arch:arm64_armv8-a,sdk:,链接:共享,版本:1可用的变体:
os:android,image:,arch:arm64_armv8-a,sdk:,link:共享,版本:
os:android,image:,arch:arm64_armv8-a,sdk:,link:shared,版本:1
os:android,image:,arch:arm64_armv8-a,sdk:,link:static,版本:
os:android,image:,arch:arm64_armv8-a,sdk:,link:static,版本:1
os:android,image:,arch:arm_armv8-a,sdk:,link:共享,版本:
os:android,image:,arch:arm_armv8-a,sdk:,link:共享,版本:1
os:android,image:,arch:arm_armv8-a,sdk:,link:static,版本:
os:android,image:,arch:arm_armv8-a,sdk:,link:static,版本:1
如何将产品变体添加到libnativehelper?
libnativehelper是非sdk接口的一部分。所以我们不能在产品分区中使用它。如果你做反向工程,系统会给出使用非sdk接口的确切库。。。