我正在尝试为我的设备构建 LineageOS 21.0,并且我已经下载了所有需要的源代码(我对这项工作并不陌生,因为我已经为该设备成功构建了从 15 到 20 的 LineageOS)。 但在这里我遇到了我不明白的错误。 我说的是“android_packages_modules_Bluetooth”https://github.com/LineageOS-UL/android_packages_modules_Bluetooth 错误信息是这样的:
packages/modules/Bluetooth/android/app/jni/com_android_bluetooth_BluetoothQualityReport.cpp:125:70: error: use of undeclared identifier 'BT_BQR_ID'
(BluetoothQualityReportInterface*)btInf->get_profile_interface(BT_BQR_ID);
^
In file included from packages/modules/Bluetooth/android/app/jni/com_android_bluetooth_a2dp.cpp:19:
packages/modules/Bluetooth/android/app/jni/com_android_bluetooth.h:92:13: error: use of undeclared identifier 'FALLTHROUGH_INTENDED'
FALLTHROUGH_INTENDED;
^
packages/modules/Bluetooth/android/app/jni/com_android_bluetooth.h:100:13: error: use of undeclared identifier 'FALLTHROUGH_INTENDED'
FALLTHROUGH_INTENDED;
^
packages/modules/Bluetooth/android/app/jni/com_android_bluetooth_avrcp_target.cpp:298:48: error: no member named 'get_avrcp_service' in 'bt_interface_t'
sServiceInterface = getBluetoothInterface()->get_avrcp_service();
~~~~~~~~~~~~~~~~~~~~~~~ ^
packages/modules/Bluetooth/android/app/jni/com_android_bluetooth_btservice_ActivityAttribution.cpp:129:11: error: use of undeclared identifier 'BT_ACTIVITY_ATTRIBUTION_ID'
BT_ACTIVITY_ATTRIBUTION_ID);
^
packages/modules/Bluetooth/system/btif/include/btif_common.h:227:34: error: unknown type name 'bt_hci_error_code_t'
bt_hci_error_code_t hci_reason,
^
packages/modules/Bluetooth/system/btif/include/btif_common.h:228:34: error: unknown type name 'bt_conn_direction_t'
bt_conn_direction_t direction,
^
请记住,没有任何错误消息表明找不到头文件。源代码最初来自 Google,并且应该 可以工作。 可能会出现什么问题?
问题解决了!需要对我们设备的通用设备树进行大量的修改;从这个开始:链接到通用设备树