【问题标题】:Task 'bintrayUpload' not found in root project 'bin'在根项目“bin”中找不到任务“bintrayUpload”
【发布时间】:2015-06-25 06:54:08
【问题描述】:

我遵循了将我的 AAR 文件发布到 JCenter 所需的每个步骤,然后使用 https://github.com/danielemaddaluno/gradle-jcenter-publish 将其与 Maven Central 同步。 我按照他的第 13 步和第 14 步编写了这个命令,得到了这个错误:

G:\Android 开发应用\android-studio\gradle\gradle-2.2.1\bin>gradle bintrayUpload

FAILURE:构建失败并出现异常。

  • 出了什么问题:
    在根项目“bin”中找不到任务“bintrayUpload”。

build.gradle(项目:xxxx)

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.1.2'
    classpath 'com.github.dcendents:android-maven-plugin:1.2'
    classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {

apply plugin: 'com.jfrog.bintray'

repositories {
    jcenter()
}
}

【问题讨论】:

    标签: android maven android-studio gradle bintray


    【解决方案1】:

    此错误可能是由于系统环境变量中缺少 JDK 和 JRE“bin”路径。

    只需在环境变量中添加 JDK 和 JRE“bin”文件夹的路径即可。

    要添加路径,请按以下步骤操作:

    第 1 步:右键单击,在我的电脑/这台电脑上(Windows 8.1)。

    第 2 步:点击属性。

    第 3 步:点击左侧菜单中的高级系统设置,将打开一个对话框。

    第 4 步:带有高级选项卡的对话框,移至对话框末尾并单击“环境变量”按钮。

    第5步:在系统变量中,在变量path / PATH中添加JDK和JRE的路径。

    Example of JDK and JRE path : 
    
    C:\Program Files (x86)\Java\jre1.8.0_40\bin
    
    C:\Program Files\Java\jre1.8.0_31\bin
    

    【讨论】:

      猜你喜欢
      • 2018-05-03
      • 2015-10-05
      • 2017-08-17
      • 2020-08-20
      • 1970-01-01
      • 1970-01-01
      • 2020-01-26
      • 2022-01-17
      相关资源
      最近更新 更多