在詹金斯的任务gradle中找不到汇编版本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在詹金斯的任务gradle中找不到汇编版本相关的知识,希望对你有一定的参考价值。

我有一个android项目。它有2种口味,分别是GooglePlay和Cafebazzar。

[使用Android Studio时,我看到assembleRelease和assembleCafeBazzar以及assembleGooglePlay。

 jenkins

当我在詹金斯中使用./ gradlew -q任务--all时,在任务中看不到assembleRelease。我看到组装。我使用詹金斯(Jenkins)构建项目。如何在Jenkins中看到assembleRelease?

    + ./gradlew -q tasks --all

------------------------------------------------------------
Tasks runnable from root project
------------------------------------------------------------

Android tasks
-------------
app:sourceSets - Prints out all the source sets defined in this project.
core:sourceSets - Prints out all the source sets defined in this project.
skeleton:sourceSets - Prints out all the source sets defined in this project.

Build tasks
-----------
app:assemble - Assembles all variants of all applications and secondary packages.
core:assemble - Assembles all variants of all applications and secondary packages.
skeleton:assemble - Assembles all variants of all applications and secondary packages.
app:assembleAndroidTest - Assembles all the Test applications.
core:assembleAndroidTest - Assembles all the Test applications.
skeleton:assembleAndroidTest - Assembles all the Test applications.
app:build - Assembles and tests this project.
core:build - Assembles and tests this project.
skeleton:build - Assembles and tests this project.
app:buildDependents - Assembles and tests this project and all projects that depend on it.
core:buildDependents - Assembles and tests this project and all projects that depend on it.
skeleton:buildDependents - Assembles and tests this project and all projects that depend on it.
app:buildNeeded - Assembles and tests this project and all projects it depends on.
core:buildNeeded - Assembles and tests this project and all projects it depends on.
skeleton:buildNeeded - Assembles and tests this project and all projects it depends on.
app:clean - Deletes the build directory.
core:clean - Deletes the build directory.
skeleton:clean - Deletes the build directory.
app:cleanBuildCache - Deletes the build cache directory.
core:cleanBuildCache - Deletes the build cache directory.
skeleton:cleanBuildCache - Deletes the build cache directory.
答案

当我检出我的项目“ assembleRelease”不能作为任务使用时,我有同样的问题。当我在Android Studio中打开项目并选择“与gradle同步”时,会有一些活动,之后我可以从命令行执行“ gradlew assembleRelease”。

我不知道“与gradle同步”到底是做什么的。似乎有一个命令曾经执行过类似的操作,但似乎不再可用。

以上是关于在詹金斯的任务gradle中找不到汇编版本的主要内容,如果未能解决你的问题,请参考以下文章

在 Jenkins 的任务 gradle 中找不到 assembleRelease

在根项目中找不到任务“publishApkRelease”

在根项目中找不到任务“publishApkRelease”

Gradle在本地Maven存储库中找不到现有的依赖项

Kotlin 在片段中找不到按钮 ID,为啥?

学习 PyQt5。在我的代码片段中找不到错误 [关闭]