当前位置: 首页> 游戏> 手游 > 河北政府采购网_公司网站怎么建立_微信群拉人的营销方法_内容营销

河北政府采购网_公司网站怎么建立_微信群拉人的营销方法_内容营销

时间:2025/7/8 20:34:35来源:https://blog.csdn.net/xss534890437/article/details/145858302 浏览次数:0次
河北政府采购网_公司网站怎么建立_微信群拉人的营销方法_内容营销

接上篇文章,实现binder service 的第二种方式,这种在系统里面比较常见

先看下整体目录结构,整体差别不大。

一 android.bp 编译aidl 文件

aidl_interface {name: "libserviceaidl",srcs: ["aidl/com/test/IService.aidl","aidl/com/test/IServiceCallback.aidl",],include_dirs: ["aidl"],local_include_dir: "aidl",backend: {cpp: {enabled: true,},},versions: ["1",],
}

make libserviceaidl 

会报一系列错误,按照报错处理就可以了。

报错处理:

FAILED: out/soong/.intermediates/vendor/qcom/proprietary/testserver/libserviceaidl/libserviceaidl-api/checkapi_current.timestamp
echo "API dump for the current version of AIDL interface libserviceaidl does not exist." && echo Run "m libserviceaidl-update-api", or add "unstable: true" to the build rule for the interface if it does not need to be versioned && false
API dump for the current version of AIDL interface libserviceaidl does not exist.
Run m libserviceaidl-update-api, or add unstable: true to the build rule for the interface if it does not need to be versioned

执行 m libserviceaidl-update-api

[100% 352/352] //vendor/qcom/proprietary/testserver/libserviceaidl:libserviceaidl-api Making AIDL API of libserviceaidl as version current
FAILED: out/soong/.intermediates/vendor/qcom/proprietary/testserver/libserviceaidl/libserviceaidl-api/updateapi_current.timestamp
echo "module libserviceaidl-api missing dependencies: vendor/qcom/proprietary/testserver/libserviceaidl/aidl_api/libserviceaidl/1" && false
module libserviceaidl-api missing dependencies: vendor/qcom/proprietary/testserver/libserviceaidl/aidl_api/libserviceaidl/1
17:33:18 ninja failed with: exit status 1

按照提示 libserviceaidl/aidl_api/libserviceaidl/1,新建各级目录,缺少加啥,然后把aidl 文件放进去

###############################################################################
# ERROR: Backward incompatible change detected on AIDL API                    #
###############################################################################
Above AIDL file(s) has changed in a backward-incompatible way, e.g. removing
a method from an interface or a field from a parcelable. If a device is shipped
with this change by ignoring this message, it has a high risk of breaking later
when a module using the interface is updated, e.g., Maineline modules.
17:41:40 ninja failed with: exit status 1
 

把current 生成的文件放到 version 1的目录,覆盖掉,保持一致就可以了。

编译成功会生成ystem/lib/libserviceaidl-V1-cpp.so  ,push 到system/lib/下

二,编译Native service 和 client

cc_binary {name: "testservverfirst",srcs: ["servertest.cpp",],shared_libs: ["liblog","libcutils","libutils","libbinder","libserviceaidl-cpp", ],init_rc: ["testservver.rc"],
}cc_binary {name: "clienttest",srcs: ["clienttest.cpp", ],shared_libs: ["liblog","libcutils","libutils","libbinder","libserviceaidl-cpp", ],
}

调用方式和前面文章一致,添加selinux 权限也一样。
 

关键字:河北政府采购网_公司网站怎么建立_微信群拉人的营销方法_内容营销

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: