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

简介: 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

成功运行

目录
相关文章
|
3月前
|
Android开发
解决Android、Flutter编译时Gradle报错:javax.net.ssl.SSLException: Connection reset
解决Android、Flutter编译时Gradle报错:javax.net.ssl.SSLException: Connection reset
356 0
|
4月前
|
API
Vue2和Vue3的区别,OptionsAPI与CompositionAPI的区别,Vue2所有的数据,都写在data和method方法中,setup是一个全新的配置项,Vue2是选项式API的写法
Vue2和Vue3的区别,OptionsAPI与CompositionAPI的区别,Vue2所有的数据,都写在data和method方法中,setup是一个全新的配置项,Vue2是选项式API的写法
|
6月前
|
Java 关系型数据库 数据库连接
实时计算 Flink版操作报错之遇到错误org.apache.flink.table.api.ValidationException: Could not find any factory for identifier 'jdbc',该如何解决
在使用实时计算Flink版过程中,可能会遇到各种错误,了解这些错误的原因及解决方法对于高效排错至关重要。针对具体问题,查看Flink的日志是关键,它们通常会提供更详细的错误信息和堆栈跟踪,有助于定位问题。此外,Flink社区文档和官方论坛也是寻求帮助的好去处。以下是一些常见的操作报错及其可能的原因与解决策略。
|
API
Unable to register node “xxx“ with API server: Unauthorized
Unable to register node “xxx“ with API server: Unauthorized
932 0
|
缓存 IDE Go
已解决Gradle错误:“Unable to load class ‘org.gradle.api.plugins.MavenPlugin‘
已解决Gradle错误:“Unable to load class ‘org.gradle.api.plugins.MavenPlugin‘
1328 0
Gradle筑基篇(四)-Gradle APi详解
前面我们使用两篇文章讲解了Gradle一些基础知识和Groovy语法详解 > 工欲善其事必先利其器 今天我们来讲解下`Gradle的Api`相关知识
|
存储 缓存 IDE
Android Studio 3.1.3 Gradle同步错误无法下载Gradle-Core.jar
Android Studio 3.1.3 Gradle同步错误无法下载Gradle-Core.jar
733 0
|
IDE 开发工具
Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention‘
Unable to load class ‘org.gradle.api.internal.plugins.DefaultConvention‘
1305 0
Unable to load class 'org.gradle.api.internal.component.Usage
Unable to load class 'org.gradle.api.internal.component.Usage
124 0