gradlew常用命令笔记
作者:互联网
-
查看错误信息:
-
gradlew compileDebugSources
-
.\gradlew compileDebug --stacktrace
-
.\gradlew compileDebugSources
-
查看依赖
-
gradlew :app:dependencies
-
查看依赖关系
-
./gradlew :app:dependencies –configuration compile
-
剔除重复依赖
api('com.github.niorgai:StatusBarCompat:2.3.3', {
exclude group: 'androidx.appcompat:appcompat'
exclude group: 'com.google.android.material:material'
})
-
./gradlew -v 版本号
-
./gradlew clean 清除app目录下的build文件夹
-
./gradlew build 检查依赖并编译打包
-
/gradlew build 命令把debug、release环境的包都打出来
-
./gradlew assembleDebug 编译并打Debug包
-
./gradlew assembleRelease 编译并打Release的包
-
./gradlew aR
-
./gradlew installRelease Release模式打包并安装
-
./gradlew iR
-
./gradlew uninstallRelease 卸载Release模式包
标签:依赖,app,gradlew,笔记,编译,build,常用命令,Release 来源: https://blog.51cto.com/u_15249199/2858419