IDE gradle 同步报错 IDE gradle 同步报错 Unable to find method ''org.gradle.api.tasks.TaskInputs org.gradle.api.tasks.TaskInputs.file

具体报错如下:

9:32 上午 Gradle sync failed: Unable to find method ''org.gradle.api.tasks.TaskInputs org.gradle.api.tasks.TaskInputs.file(java.lang.Object)''

'org.gradle.api.tasks.TaskInputs org.gradle.api.tasks.TaskInputs.file(java.lang.Object)'

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.

Consult IDE log for more details (Help | Show Log) (8 s 302 ms)




解决方案:


工程build.gradle的配置:

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.1'
    classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'

}


org.greenrobot:greendao-gradle-plugin  版本改为 3.3.0


app目录下的build.gradle 配置

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'org.greenrobot:greendao:3.2.2'
    implementation 'com.android.support:recyclerview-v7:26.0.0-alpha1'
    implementation 'com.jakewharton:butterknife:7.0.1'
    implementation 'com.android.support:support-v4:26.0.0-alpha1'
    implementation 'com.android.support:appcompat-v7:26.0.0-alpha1ƒ'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.3.0'
    implementation(name: 'frpclib', ext: 'aar')
//    compile 'cn.carbs.android:ExpandableTextView:1.0.0'
}


org.greenrobot:greendao 的版本改为 3.3.0 


成功运行



仙士可博客
请先登录后发表评论
  • 最新评论
  • 总共0条评论
  • 本站由白俊遥博客程序搭建
    © 2017-1-17 php20.cn 版权所有 ICP证:闽ICP备17001387号
  • 联系邮箱:1067197739@qq.com