1.在frameworks/base/libs目录下新建自己的文件夹hello
2.把xxx.jar包放入hello文件夹
3.编写Android.bp
java_import {
name: “hello_sdk”,
jars: [
“xxx.jar”,
],
}
4.修改frameworks/base/Android.bp
// Collection of classes that are generated from non-Java files that are not listed in
// framework_srcs. These have no or very limited dependency to the framework.
java_library {
name: “framework-internal-utils”,
static_libs: [
“com.android.sysprop.localization”,
“PlatformProperties”,
“hello_sdk”,
],
sdk_version: “core_platform”,
installable: false,
}
Framework导入jar包
于 2023-01-13 15:24:59 首次发布