Am trying to add the include fwk/base/pkgs/SettingsLib/common.mk onto Settings App, But am unsure how to use it on Android.bp file.
I used the androidmk conversion tool which comes with the AOSP build system to convert Android.mk to Android.bp
What I DID:
1. On AOSPSource code, check build/soong/androidmk and make full build.
2. After compiling the source code, the androidmk generation tool located :
# out/soong/host/linux-x86/bin/androidmk
3. Using the androidmk command try converting my Android.mk to Android.bp
# androidmk Android.mk > Android.bp
Error inside Android.bp
20 // **ANDROIDMK TRANSLATION ERROR: unsupported include**
21 // include frameworks/base/packages/SettingsLib/search/common.mk$
Any suggestions? Thanks in advance.
Found way to convert Android.mk to Android.bp and import on App.
Core AOSP androidmk tool does NOT help, We need to manually create a SettingsLibDefaults on SettingsLibs ( create a Defaults on any libs). Referred AOSP SettingsLib Android.bp file .
// NOTE: Keep this module in sync with ./common.mk
java_defaults {
name: "SettingsLibDefaults",
static_libs: [
"androidx.annotation_annotation",
"androidx.lifecycle_lifecycle-common",
"androidx.legacy_legacy-support-v4",
"androidx.lifecycle_lifecycle-runtime",
"androidx.recyclerview_recyclerview",
"androidx.preference_preference",
"androidx.appcompat_appcompat",
"androidx.legacy_legacy-preference-v14",
"SettingsLib",
],
}
Usage of SettingsLibDefaults on Settings App Android.bp file
android_library {
name: "Settings-core",
platform_apis: true,
defaults: [
"SettingsLibDefaults",
"SettingsLib-search-defaults",
],
Same way we need to create a Defaults on any libs Android.bp file and import on Apps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.