current position:Home>Some useful command accumulation in Android development

Some useful command accumulation in Android development

2023-01-25 11:30:42Someone from Yungu Li

Various commands are collected here,It will be perfected later...

Gradle的一些操作命令
  • 查看所有任务
    gradlew tasks --all
  • View third-party dependency tree
    gradlew :app:dependencies
    gradlew :app:dependencies --configuration releaseRuntimeClasspath
  • 查看构建版本
    gradlew -v
  • 清理build文件夹
    gradlew clean
  • 构建项目
    gradlew build
  • 编译并安装debug包
    gradlew installDebug
  • Find the dependency tree and pack it into a local filea.txt
    gradlew :app:dependencies>a.txt
  • Refresh dependency cache
    gradlew build --refresh-dependencies
adb的一些操作命令
  • 查看rom信息
    adb shell getprop | findstr release
  • 查看手机是64位还是32位
    adb shell getprop ro.product.cpu.abi
  • 清空com.x缓存
    adb shell pm clear com.x
  • 设置字体大小1.0
    adb shell settings put system font_scale 1.0
  • Open App Access
    adb shell pm grant com.x android.permission.PACKAGE_USAGE_STATS
  • 查看当前的activity
    adb shell “dumpsys window | grep mCurrentFocus”
  • View the current one dynamicallyactivity
    adb shell
    dumpsys activity | grep “Resume”

copyright notice
author[Someone from Yungu Li],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2023/025/202301251120396002.html

Random recommended