gradlew 命令大全

作者: 古早味蛋糕 | 来源:发表于2022-08-02 18:03 被阅读0次

gradlew clean //类似Clean Project

gradlew -v //查看Gradle、Groovy、Ant、JVM等的版本

gradlew build --info //编译并打印日志

gradlew dependencies --info //查看详细的依赖信息

gradlew assembleDebug or /gradlew aD 编译并打Debug包

gradlew assembleRelease or /gradlew aR 编译并打Release的包

gradlew installDebug //打debug包并安装

gradlew installRelease //Release模式打包并安装

gradlew build 构建项目

gradlew installRelease or /gradlew iR Release模式打包并安装
gradlew installDebug or /gradlew iD Debug模式打包并安装
gradlew uninstallRelease or ./gradlew uR 卸载Release模式包
gradlew uninstallDebug or ./gradlew uD 卸载Debug模式包

需要说明的是这些命令可以叠加使用,例如:
gradlew clean build --info > bugtags.log

gradlew compileDebug --stacktrace
gradle compileDebug --stacktrace
gradlew compileDebug --info
gradlew compileDebug --debug
gradlew compileDebugJavaWithJavac
在android开发的时候,有时候会遇到这样的问题Error:Execution failed for task ':test:processDebugManifest'.> Manifest merger failed with multiple errors, see logs但是要命的是,除了这个log,没有什么其他的有用信息了,怎么办?
处理方式是这样的: 首先进入命令行,输入命令gradlew processDebugManifest --stacktrace

输入命令gradlew compileDebugSources --stacktrace -info然后仔细查找,就能找到你认识的类跟具体出错的地方了

相关文章

网友评论

    本文标题:gradlew 命令大全

    本文链接:https://www.haomeiwen.com/subject/bsrajctx.html