gpt4 book ai didi

gradle - 将Android Studio更新为3.0后,在根项目中找不到任务 ‘bintrayUpload’

转载 作者:行者123 更新时间:2023-12-03 03:59:57 25 4
gpt4 key购买 nike

在更新gradle和android studio之前,我曾使用tutorial的这些任务将我的库上载到Bintray:

第一:gradlew install
第二个:gradlew bintrayUpload
但是在更新了android studio和gradle之后,我不得不将拳头任务更改为:gradlew installDebug但是gradle无法找到任务bintrayUpload,但出现此错误:

* What went wrong:
Task 'bintrayUpload' not found in root project 'MyProject'.

* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

最佳答案

您需要在bintray中定义一个build.gradle任务。由于您没有该文件,因此gradlew无法找到并执行该任务。根据您的设置定义如下所示的内容,您就可以了。

apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'


bintray {
user = ...
key = ....
publications = ....
pkg {
...
}
}

关于gradle - 将Android Studio更新为3.0后,在根项目中找不到任务 ‘bintrayUpload’,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47392238/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com