Android 开发常用命令汇总

  1. 分析项目包的依赖关系,并保存到name.txt文件中

    gradlew :app:dependencies >name.txt

  2. 获取手机上当前正在显示的应用的包名及Activity

    adb shell dumpsys window | findstr “mFocused”

  3. 获取手机分辨率

    adb shell wm size

  4. 卸载应用

    adb uninstall [包名]

  5. 获取 cpu 位数,如 arm64-v8a

    adb shell getprop ro.product.cpu.abi

  6. 查看端口是否被占用

    netstat -ano | findstr “8080”

  7. 谷歌浏览器截屏方法

    F12 -> Ctrl + Shift + P -> 搜 “Capture”

发布了11 篇原创文章 · 获赞 24 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/yingchengyou/article/details/105262633