Gradle 任务‘;宾特拉尤普洛德&x2019;将Android studio更新为3.0后在根项目中找不到

Gradle 任务‘;宾特拉尤普洛德&x2019;将Android studio更新为3.0后在根项目中找不到,gradle,aar,bintray,Gradle,Aar,Bintray,在我更新gradle和android studio之前,我曾使用以下任务将我的库上载到bintray: 首先:gradlew安装 第二个:gradlew bintrayUpload 但在更新android studio和gradle之后,我不得不将第一个任务更改为:gradlewinstallDebug 但是gradle找不到taskbintrayUpload,我得到了这个错误: * What went wrong: Task 'bintrayUpload' not found in root

在我更新gradle和android studio之前,我曾使用以下任务将我的库上载到bintray:

首先:
gradlew安装

第二个:
gradlew bintrayUpload

但在更新android studio和gradle之后,我不得不将第一个任务更改为:gradlew
installDebug
但是gradle找不到task
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

您需要在
build.gradle
中定义一个
bintray
任务。由于您没有,因此,
gradlew
无法找到并执行该任务。根据您的设置定义如下所示,您会很好

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


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

解决方案就在这里:我必须在lib gradle中添加这些行

// Place it at the end of the file
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
它将加载并向gradle添加bintray任务