1. 程式人生 > >Android Studio 解決 Error:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks

Android Studio 解決 Error:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks

Gradle編譯異常資訊

Error:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputFilePropertyBuilder;'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

原因:

由於使用的gradle編譯版本過低造成的.

解決方法:

  1. 檢視Gradle的版本: Gradle地址.
  2. 修改在專案的根目錄下gradle/wrapper/目錄下的gradle-wrapper.properties檔案,
    將原有的
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

中gradle-2.14.1-all.zip改成步驟1中的所看到的合適的版本, 如下

distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip

相關推薦

Android Studio 解決 Error:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks

Gradle編譯異常資訊 Error:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputFilePropertyB

解決Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List

解決新增Butterknife8.8.1依賴後出錯的問題 1.在根目錄下的build.gradle中的dependencies新增如下: 這裡注意是8.4.0的版本!! classpath 'com.jakewharton:butterknife-gradle-pl

Android studio出現Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Request"的解決辦法

tar iss returns 圖片 height proxy alt req turn 最近更新了一下Android Studio(下文簡寫成AS),然後打開工程發現出現Error:Unable to tunnel through proxy. Proxy returns

整合butterknife出現 Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()

錯誤為: Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'. Possible causes for this unexpected erro

Android studio出現Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Reques的解決辦法

最近更新了一下Android Studio,在匯入新專案之後出現Error:Unable to tunnel through proxy. Proxy returns “HTTP/1.1 400 Bad Request”的錯誤,如下圖所示: 經過檢查後發現這裡是丟失了android studio的gradl

Android studio 出現Error:failed to find Build Tools revision 28.0.0 rc1解決方案

在Android studio中新建專案出現上圖所示錯誤,解決方案為:在app->build.gradle中修改buildToolsVersion這一項的版本號修改後的app->build.gradle檔案內容如下:

android studio提示Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Reques

解決方法:1.studio裡面->setting->Build,Execution,Deployment裡面的Gradle->配置此專案的gradle檔案路徑為studio應用所使用的版本路徑(如果還報錯,檢視gradle版本是否與studio版本一致)

解決 Error:Unable to find encoder for type stored in a Dataset

Error: Unable to find encoder for type stored in a Dataset.  Primitive types (Int, String, etc) and Product t

徹底解決 error: Unable to find vcvarsall.bat

轉自:http://blog.csdn.net/secretx/article/details/17472107 1.windows上做Python開發,搭環境還真不比Linux容易。error: Unable to find vcvarsall.bat這個錯誤眼熟吧? 凡

轉載:徹底解決 error: Unable to find vcvarsall.bat

轉自:http://blog.csdn.net/secretx/article/details/17472107 侵權刪 1.windows上做Python開發,搭環境還真不比Linux容易。error: Unable to find vcvarsall.bat這

Android Studio 3.1.4,gradle 4.4解決Error:Unable to resolve dependency for ':@debug/compileClasspath'問題

    最近把Android studio升級到3.1.4,可是新建一個空專案在build的時候都出現問題,本來不是很重視,把不需要的直接注掉即可,但是因為匯入公司的一個專案來編譯,結果還是報了同樣的錯(引入的依賴庫出現了問題),最終在網上找了很多方法,最終解決了,記錄下過程

Android studio中提示 unable to locate adb的解決方法

- 檢查是否有其他軟體佔用了adb的埠 1、進入Android studio的terminal,也可以用電腦自帶的控制檯 2、控制檯中輸入 netstat -anp | grep 5037 1)adb佔用的是5037埠,通過埠查詢使用該埠的程序,如

Python3 pip 解決問題: error: Unable to find vcvarsall.bat

當我給 python3.5 安裝 第三方庫 charset 時:pip install charset,出現了錯誤: D:\WorkSpace\python_ws\python-large-web-crawler\firstdemo>pip

Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解決方法

今天更新Android Studio後開啟Project,報如下錯誤: Error:Could not find com.android.tools.build:gradle:2.2.1. Searched in the following locations:    fi

Android 6.0中"Unable to find optional library: org.apache.http.legacy"錯誤解決

Android 6.0版本已經已經基本將Apahce Http Client 移除出SDK,會報出以下錯誤: " Unable to find optional library: org.apache.http.legacy"  那麼問題來了,如果我在以前的專案中使用

Android 專案報錯 Error:Unable to find optional library: org.apache.http.legacy

Eclipse 專案移植到AndroidStduio 後 執行報錯Error:Unable to find optional library: org.apache.http.legacy Android 6.0版本已經已經基本將Apahce Http Client 移

Android stuido 錯誤:Error:Unable to find optional library: org.apache.http.legacy

今天在匯入新專案的時候出現了一個從來都沒有見過的錯誤,讓我鬱悶了很久,在網上也找了很多一樣錯誤解決方法,但是最終也是沒有解決,不能說網上的解決方法是錯誤,只能說網上的解決辦法是最基礎的,有時候不能夠解決問題,錯誤的截圖如下: 網上的解決辦法是: 1.   API23

Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state

strong state star intro https ogr enable introduce gin For me, the solution (workaround) is to turn off JavaScript debugging on Chrome, w

xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH

view chmod baidu aid log nts pac mod ica Xcode升級到8.3後 用命令進行打包 提示下面這個錯誤 xcrun: error: unable to find utility "PackageApplication", not a

[vscode react-native] xcrun: error: unable to find utility "instruments", not a developer tool or in

執行環境:Mac + vscode + xcode IOS ReactNative執行的時候出現這個錯誤 使用vscode執行reactnative 專案時報錯:xcrun: error: unable to find utility "instruments", not a develop