今天運行程序測試的時候突然報錯,檢測了一下居然找不到androidx.localbroadcastmanager.content.LocalBroadcastManager
本地廣播這個類,最終在官網找到了答案
This class is deprecated.
LocalBroadcastManager is an application-wide event bus and embraces layer violations in your app: any component may listen events from any other. You can replace usage of LocalBroadcastManager
with other implementation of observable pattern, depending on your usecase suitable options may be LiveData
or reactive streams.