gradlew build clean --info --> jzl.log 或者 gradlew build clean --info : 查看gradle启动信息
adb shell dumpsys actvity : 用来查看Launcher启动MainActivity信息
adb shell dumpsys activity activities :用来查看当前栈中的Activity信息
adb logcat -s 标签名 在命令行中查看LOG信息
adb shell kill [PID] //杀死进程第一种方法
adb shell am force-stop 包名 // 强制杀死进程第二种方法
adb shell ps //查看所有进程列表,Process Status
adb shell ps|grep <package_name> //查看package_name程序进程
adb shell ps -x [PID] //查看PID进程状态
adb shell top|grep <package_name> //实时监听程序进程的变化
adb shell cat /proc/cpuinfo 查看手机CPU信息
adb shell pm uninstall com.hrmp 卸载程序
adb shell dumpsys window w | findstr mCurrent 显示当前界面的名字
adb kill-server , adb start-server , 结束 adb 服务, 启动 adb
一般在连接出现异常,使用 adb devices 未正常列出设备, 设备状态异常时使用 kill-server,然后运行 start-server 进行重启服务
adb logcat , 打印 Android 的系统日志,这个可以单独拿出来讲
adb bugreport , 打印dumpsys、dumpstate、logcat的输出,也是用于分析错误
输出比较多,建议重定向到一个文件中
adb bugreport > d:\bugreport.log
adb netstat -ano|findstr “5037” 查看5037端口连接设备
keytool -v -list - keystore D:\WorkSpace\as\hrmp\hrmp.jks //查看签名
-list:列出密钥库中的条目。
-keystore:数字证书位置。
gradlew tasks //查看所有运行的task
gradlew xxx --stac
gradlew compileDebug --stac
gradlew compileDebug --debug
gradlew compileDebug --info
gradlew compileDebugJavaWithJavac
gradlew app:dependencies > temp.log //用temp.log文件保存依赖树 (app为想打印module的名字)
gradlew AndroidDependencies > temp.log //用temp.log文件保存依赖树
gradlew :app:processDebugManifest --stacktrace 查看具体日志
android {
lintOptions {
abortOnError false
}
}