完美解決:
Unable?to?find?method?'org.gradle.api.tasks.TaskInputs.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;'.
Possible?causes?for?this?unexpected?error?include:
Gradle's?dependency?cache?may?be?corrupt?(this?sometimes?occurs?after?a?network?connection?timeout.)
Re-download?dependencies?and?sync?project?(requires?network)
The?state?of?a?Gradle?build?process?(daemon)?may?be?corrupt.?Stopping?all?Gradle?daemons?may?solve?this?problem.
Stop?Gradle?build?processes?(requires?restart)
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.
In?the?case?of?corrupt?Gradle?processes,?you?can?also?try?closing?the?IDE?and?then?killing?all?Java?processes.
出現(xiàn)這個(gè)問題的原因大概是別人的項(xiàng)目引用的gradle包在你as下無法識別無法解壓導(dǎo)致的噪叙,先用你本地的gradle包(沒有的話https://services.gradle.org/distributions/去下載)堕油,然后再運(yùn)行掰曾,沒有這樣的錯(cuò)誤后磅叛,接下來按提示操作就可以
如下圖:
解決方案:
首先打開AS的setting->Gradle->Gradle projects,選擇Specified location ,然后選擇本地的gradle 文件
本地gradle文件目錄如果沒有設(shè)置過的話,一般都在C盤的user-用戶名-.gradle\wrapper\dists.......下面潦蝇,如下圖
最后點(diǎn)擊 Apply 后库快,同步就完美解決啦