gpt4 book ai didi

android - Android 构建中的 libnativehelper 缺少变体

转载 作者:行者123 更新时间:2023-12-04 23:51:31 30 4
gpt4 key购买 nike

我正在尝试在 Android 产品分区中编译 JNI。为此,我添加了属性 product_specific: true在 Android.bp 如:

cc_library_shared {
name : "..."
...
shared_libs: [
"libandroidicu",
"libnativehelper",
"libcutils",
"libutils",
"liblog",
],
proprietary : false;
product_specific: true
不幸的是,在编译时出现以下错误:

Android.bp:1:1: dependency "libnativehelper" of "libTest_jni" missing variant:
  os:android, image:product.30, arch:arm64_armv8-a, sdk:, link:shared, version:1

available variants:
  os:android, image:, arch:arm64_armv8-a, sdk:, link:shared, version:
  os:android, image:, arch:arm64_armv8-a, sdk:, link:shared, version:1
  os:android, image:, arch:arm64_armv8-a, sdk:, link:static, version:
  os:android, image:, arch:arm64_armv8-a, sdk:, link:static, version:1
  os:android, image:, arch:arm_armv8-a, sdk:, link:shared, version:
  os:android, image:, arch:arm_armv8-a, sdk:, link:shared, version:1
  os:android, image:, arch:arm_armv8-a, sdk:, link:static, version:
  os:android, image:, arch:arm_armv8-a, sdk:, link:static, version:1


如何将产品变体添加到 libnativehelper?

最佳答案

libnativehelper 是非 SDK 接口(interface)的一部分。所以我们不能在产品分区中使用它。如果您进行逆向工程,系统将给出使用非 sdk 接口(interface)的确切库...

关于android - Android 构建中的 libnativehelper 缺少变体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67062533/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com