Android 11 SystemUI 去掉Navigationbar 长按WiFi或蓝牙图标SystemUI 崩溃
去掉Naviagionbar
运行在Android10系统中可以正常操作内容提供者的数据库,运行在Android11
1、android 11 检查版本后下载,下载完成后执行安装apk方法。安装过程结束提示”未安装应用“。
2、如果把原来的apk删除,直接手动安装下载的apk,成功。



BeaconNetwork.downloadDFU(parameter).apply { if (Utils.isExternalStorageLegacy()) { // 分区存储 val contentUri = MediaStore.Downloads.getContentUri("external") val contentValues = ContentValues() contentValues.put( MediaStore.Downloads.RELATIVE_PATH, Environment.DIRECTORY_DOWNLOADS ) contentValues.put( MediaStore.Downloads.DISPLAY_NAME, "${fileName}.dfu" ) contentResolver.insert(contentUri, contentValues)?.let { launch(Dispatchers.IO){ val readBytes = byteStream().readBytes() contentResolver.openOutputStream(it)?.use {out -> out.write(readBytes) } fileNameLiveData.postValue("${fileName}") fileByteLiveData.postValue(readBytes) fileSizeLiveData.postValue(readBytes.size) handler.sendEmptyMessage(0x0002) } }?: let { Log.e(TAG, "downloadDfu: null" ) handler.sendEmptyMessage(0x0002) } return@coroutineScope } }
同一份代码,有些文件无法保存。控制台打印
E/SQLiteDatabase: Error inserting UNIQUE constraint failed: files._data (Sqlite code 2067 SQLITE_CONSTRAINT_UNIQUE), (OS error - 2:No such file or directory) downloadDfu: null
但是是修改文件名之后就能正常保存。不知道是什么原因,有大神知道吗

[ 54% 59734/109452] //packages/apps/HpSetting:HpSettings-core fix manifest [common]
FAILED: out/soong/.intermediates/packages/apps/HpSetting/HpSettings-core/android_common/manifest_fixer/AndroidManifest.xml
out/soong/host/linux-x86/bin/manifest_fixer --minSdkVersion 30 --targetSdkVersion 30 --raise-min-sdk-version --library packages/apps/HpSetting/AndroidManifest.xml out/soong/.intermediates/packages/apps/HpSetting/HpSettings-core/android_common/manifest_fixer/AndroidManifest.xml
error: unbound prefix: line 23, column 4
03-14 18:11:48.450 E/LoadedApk(30805): Unable to instantiate appComponentFactory
03-14 18:11
目标targetSDKversion大于等于30时,需要获取storage/emulated/0/**/存取权限,下面是网上找的获取权限的方法 Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION); intent.setData(Uri.parse("package:" + this.getPackageName())); startActivityForResult(intent, REQUEST_CODE); w问题解决了,新的问题又来了,这样做不合规,也不友好。有没有其他更好的办法解决这个问题。
2021-08-16 11:06:03.581 11432-11432/com.lw.looperview D/SlideMenuView
报错信息:
12-16 11
我测试光线传感器,重力传感器都是正常的
运行结果:
2022-04-11
问题描述:
<
Copyright © 阳光沙滩V1.0.3(2014-) 本网站由程序猿(媛)用爱驱动