- 博客(1200)
- 资源 (28)
- 收藏
- 关注
原创 Could not find androidx.camera:camera-view
Could not find androidx.camera:camera-view
2022-09-29 18:02:49 852
原创 Detected Maven Version: 3.8.1 is not in the allowed range 3.8.3.
Detected Maven Version: 3.8.1 is not in the allowed range 3.8.3.
2022-09-07 18:34:53 1011
原创 解决:The POM for xxx is missing, no dependency information available
mvn install
2022-09-07 17:13:07 2988 1
原创 linux shell脚本获取时间差
#!/bin/shtimer_start=`date "+%Y-%m-%d %H:%M:%S"`echo "开始时间:$timer_start"#测试,睡眠3秒sleep 3s timer_end=`date "+%Y-%m-%d %H:%M:%S"`echo "结束时间:$timer_end"start_seconds=$(date --date="$timer_start" +%s);end_seconds=$(date --date="$timer_end" +%s);ec
2022-05-23 14:38:36 744
原创 onCharacteristicChanged
onConnectionStateChange当接收到数据时会回调onConnectionStateChangeonConnectionUpdated当蓝牙连接的参数改变时会回调onConnectionUpdated在蓝牙设备建立连接之后,系统默认会设定一些连接参数,这样就会多次执行onConnectionUpdated回调,我们一定要通过一些同步机制或延时设置的方式来确保自己的参数设置成功,比如假如我们设置后,系统又设置了一次,就会出现参数被覆盖的情况。参考:Android BLE中心设备的o
2022-05-20 14:02:20 1775
原创 Android dependency ‘androidx.core:core’ has different version for the compile
直接在安卓项目的根目录下的build.gradle添加代码如下:subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'androidx.core' && !details.requested.name.contains('androi
2022-05-19 16:45:31 1428
原创 > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.参考:Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
2022-05-17 15:59:22 268
原创 git push的git lfs大文件管理
git push时报错:remote: 大文件请使用 Git-LFS 管理步骤1.安装git lfs install参考:Git - push超大文件到远程仓库
2022-05-16 17:05:57 1394
原创 Android项目可以添加到.gitignore中的目录或者文件
Android项目可以添加到.gitignore中的目录或者文件:*.iml.gradle.idea.DS_Store/build.externalNativeBuild.cxxlocal.properties
2022-05-16 16:36:26 240
原创 activity启动时会有黑屏/白屏
其中bg_splash是一张全屏的启动图片,在这里设置的图片,在点击app图标的那一刻就会加载。因此去掉白屏或黑屏,1. APP启动黑/白屏的原因首先,我们需要知道一个APP启动时,屏幕上都会有什么。在我们的APP里,显示在屏幕上的自然是各个View了,而我们的View又都是在Activity的onCreate()方法中调用了setContentView()方法,传入了我们的layout文件,也就是我们理论上应该看到的Activity内容。但是Android系统在启动一个新的Activity时,首先进行
2022-05-16 15:53:48 926
原创 git回退到某个commit
1、回退到指定的commitgit reset --hard commit_id //退到/进到 指定的commit2、强推到远程仓库git push origin HEAD --forceps:如果无法强推,可能是分支处于保护状态,先在后台取消该分支保护。3、多人协作注意如果项目有多人共同开发,需要注意让其他伙伴把本地代码也回滚到指定版本(通过前面的回退命令),否则会出现已回滚的代码又重新被提交的情况。...
2022-05-13 16:32:36 18345
原创 Android 静默安装
不通过pm install命令的方式进行安装,直接调用系统的apiimport android.app.PendingIntent;import android.content.Context;import android.content.Intent;import android.content.pm.PackageInstaller;import android.content.pm.PackageManager;import android.os.Build;import android
2022-05-13 10:11:10 2457
原创 Android报错:Cannot run program “su “: error=13, Permission denied
参考:Android:java.io.IOException: Cannot run program “/system/xbin/su”: error=13, Permission deniedCannot run program "su ": error=13, Permission denied in Android Application
2022-05-06 11:33:34 15835
原创 Android广播:BroadcastQueue: Background execution not allowed: receiving
system_process W/BroadcastQueue: Background execution not allowed: receiving Intent xxxxxxxx参考:隐式广播 BroadcastQueue: Background execution not allowed: receiving Intent USB_PERMISSION Android O 8.0
2022-04-22 15:39:45 931
原创 Sending non-protected broadcast
Android发送广播时报错:Sending non-protected broadcast action_sensor_data from system xxxxxxxxxx原因:Ams在发送广播时,对于systemApp(系统应用),会要求发送广播必须是声明在frameworks\base\core\res\AndroidManifest.xml里面的protected-broadcast。这是为了提醒 系统应用开发者去将 broadcast 添加到protected-broadcast,因
2022-04-22 15:14:48 4623
原创 Android 代码授予悬浮窗权限
adb shell pm grant packageName android.permission.SYSTEM_ALERT_WINDOW
2022-04-22 15:05:13 2380
原创 Android 代码授予悬浮窗权限
adb shell pm grant packageName android.permission.SYSTEM_ALERT_WINDOW
2022-04-22 12:00:31 1764
原创 bluetoothGatt.disconnect()无效,还是保持着连接
bluetoothGatt.disconnect()无效,不能断开连接,还是与设备保持着连接,导致其他手机扫描不到这个设备参考:蓝牙bluetoothGatt.disconnect()和bluetoothGatt.close()两个方法的区别华为手机蓝牙调用 disconnect无效,手机还是和设备的蓝牙处于连接状态,为什么?...
2022-04-20 15:39:40 1325
原创 FileDownloader使用
github地址:https://github.com/lingochamp/FileDownloader支持多任务下载支持多线程下载支持 断点续传添加依赖:dependencies { implementation 'com.liulishuo.filedownloader:library:1.7.3'}Application中初始化 FileDownloader:public class MyApplication extends Application {
2022-04-11 17:08:29 890 2
原创 Android静默安装
原理静默安装、卸载的原理就是利用pm install命令来安装apk,pm uninstall 来卸载apk。智能安装是利用android系统提供的无障碍服务AccessibilityService,来模拟用户点击,从而自动安装。pm命令介绍(1) pm installpm install 命令的用法及参数解释如下:pm install [-l][-r] [-t] [-i INSTALLER_PACKAGE_NAME] [-s] [-f] PATHpm命令介绍(1) pm installp
2022-04-01 11:19:33 3920
原创 Android之包安装PackageInstallerActivity
Android7.0以前的安装方式比较简单:File apk = new File(...); Uri uri = Uri.fromFile(apk); Intent intent = new Intent(); intent.setClassName("com.android.packageinstaller", "com.android.packageinstaller.PackageInstallerActivity"); intent.setData(uri); intent.addFl
2022-04-01 10:40:10 3219
原创 adb 截屏
//截屏adb shell screencap -p /sdcard/test.png//拉去到电脑中adb pull /sdcard/test.png
2022-03-31 17:52:02 4916
原创 adb shell启动进程/杀掉进程
启动应用:adb shell am start packageName/ActivityName关闭应用:adb shell am force-stop com.sairobo.setting
2022-03-21 16:43:48 2594
原创 Android中Button的默认高度是多少
Button的高度写了个比较小的数值,但是不起作用,为啥?如果app的theme设置了Theme是:<style name="AppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar"></style>则Button是有默认高度的: <style name="Widget.AppCompat.ActionButton" parent="Base.Widget.AppCompat.ActionButton"/>
2022-03-17 17:28:30 2832
原创 Maven Could not find artifact,记一次很难发现的坑点:特殊符号
Maven Could not find artifact,记一次很难发现的坑点:特殊符号看起来一样的命令可能底层的ASCII码是不一样的。Maven Could not find artifact,记一次很难发现的坑点:特殊符号
2022-03-17 15:10:42 542
WindowManagerService相关类图.eddx
2020-03-20
WindowManagerService相关类图.eddx
2020-03-20
WindowManagerService相关类图.eddx
2020-03-19
Binder.rar
2020-03-19
A Kafka-based Ordering Service for Fabric
2019-01-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人