任务“bintrayUpload'根工程”箱“未找到未找到、任务、工程、bintrayUpload

2023-09-06 07:09:22 作者:习惯丶被遗忘

我也跟着发布我的AAR文件JCenter,然后进行同步与Maven中央使用需要每一步https://github.com/danielemaddaluno/gradle-jcenter-publish 。我写了这个命令跟随他的脚步13和第14步,并得到这个错误:

G:\\ Android的开发应用\\ Android的工作室\\ gradle这个\\ gradle这个-2.2.1 \\ BIN> gradle这个bintrayUpload

失败:建立失败,一个异常

错在哪里:结果任务bintrayUpload'根工程箱没有找到。

的build.gradle(项目:XXXX)

  buildscript {库{    jcenter()}依赖{    类路径'com.android.tools.build:gradle:1.1.2    类路径'com.github.dcendents:Android的Maven的插件:1.2    类路径com.jfrog.bintray.gradle:gradle这个-bintray  - 插件:1.1    //注意:不要在这里把你的应用程序依赖关系;他们属于    //在单个模块的build.gradle文件}}allprojects {应用插件:'com.jfrog.bintray库{    jcenter()}} 

解决方案

该错误可能发生,由于缺乏系统环境变量JDK和JRE的bin的路径。

只需添加JDK和JRE的bin文件夹的路径环境变量,你是好去。

要添加路径遵循的步骤:

第1步:右键点击,在我的电脑/ PC这样(的Windows 8.1)

第二步:点击属性。

第三步:在左侧菜单中单击高级系统设置和将打开一个对话框

第四步:对话框与高级选项卡,走向对话的结束,点击环境变量按钮

第五步:在系统变量,添加JDK和JRE的路径变量的路径/ PATH

  JDK和JRE路径的例子:C:\\ Program Files文件(x86)的\\的Java \\ jre1.8.0_40 \\ BINC:\\ Program Files文件\\的Java \\ jre1.8.0_31 \\ BIN 
为什么家里笔记本的360极速浏览器开进去时显示无响应,关也关不了,任务管理器那也没有永,什么情况啊

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()
}
}

解决方案

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