工具
文章
Android核心服务、组件
谷歌三件套
Google Services Framework(com.google.android.gsf)
Google Play Services(com.google.android.gms)
Google Play Store
编程
Android后台线程执行前台UI操作:
// 解决 Can't toast on a thread that has not called Looper.prepare()
28+ Use:getApplicationContext().getMainExecutor().execute(() -> { });
new Handler(Looper.getMainLooper()).post(() -> {//避免用Looper.prepare()
Toast.makeText(context, "...", Toast.LENGTH_SHORT).show(); });
解决 AlertDialog+getApplicationContext() 报错 Unable to add window -- token null is not valid; 例外:Toast可用任何上下文及getApplicationContext()
new AlertDialog.Builder(view.getContext()).create();// or MainActivity.this
解决横竖屏切换阻止构建 android:screenOrientation="portrait" tools:ignore="LockedOrientationActivity" tools:replace="android:screenOrientation"
解决 Duplicate class kotlin... - implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.20"))
曾被报道:《尴尬!鸿蒙系统显原形,中文切换到英文,Harmony秒变安卓?》