Task 'bintrayUpload' not found in root project 'bin'

前提是你 提交于 2019-12-07 14:22:48

问题


I Followed Every step needed to publish my AAR file to JCenter and then synchronize it with Maven Central using https://github.com/danielemaddaluno/gradle-jcenter-publish. I wrote this command to follow his step 13 and step 14 and got this error:

G:\Android Development Application\android-studio\gradle\gradle-2.2.1\bin>gradle bintrayUpload

FAILURE: Build failed with an exception.

  • What went wrong:
    Task 'bintrayUpload' not found in root project 'bin'.

build.gradle(Project: 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()
}
}

回答1:


This error may be occurring due to absence of JDK and JRE "bin" path in the System Environment Variables.

Just add path of the JDK AND JRE "bin" folder in Environment Variables and you are good to go.

To add path follow steps :

Step 1 : Right Click,On My Computer/This PC(Windows 8.1).

Step 2 : Click on Properties.

Step 3 : Click on Advanced System Settings in Left Menu and a dialog will open.

Step 4 : Dialog with Advanced Tab, move towards end of dialog and click on "ENVIRONMENT VARIABLES" button.

Step 5 : In System Variables, Add Path of JDK and JRE in variable path / PATH.

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


来源:https://stackoverflow.com/questions/29715851/task-bintrayupload-not-found-in-root-project-bin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!