greendao 3.2.2配置的时候报错:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;



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.




greendao3.2.3配置时遇到的问题

这两天我一直在研究greendao这个框架,我在GitHub下载了

greendao3.2.2:https://github.com/greenrobot/greenDAO,照着网址里面来配置:

// In your root build.gradle file:
buildscript {
    repositories {
        jcenter()
        mavenCentral() // add repository
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1' classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2' // add plugin } } // In your app projects build.gradle file: apply plugin: 'com.android.application' apply plugin: 'org.greenrobot.greendao' // apply plugin dependencies { compile 'org.greenrobot:greendao:3.2.2' // add library }

后来发现配置后并不能创建项目并报了如下错误:
Error:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputFile......

我去网上找了很久都没有找到解决办法,又迷迷糊糊冲撞了一整天...

后来我仔细看了一下报错,感觉问题出现在了gradle版本上而不是Android studio上,我之前用的gradle版本是
gradle-2.14.1-all,和Android studio2.2.2版本

解决问题:
后来我在官网:https://services.gradle.org/distributions/中下载了gradle-3.5-all版本并且在Android studio
中file->settings->build,execution,deployment->Gradie
 
  

点击OK 就成功解决掉了问题

希望这个配置问题解决方法对你们有用

越努力 越幸运


转自:http://www.cnblogs.com/wangxiankai/p/6707725.html



  • 8
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值