Android开发

Could not create task ':httplib:

2023-06-28  本文已影响0人  你的益达233

今天打开前几天能用的项目,突然就报错了,你们有没有遇到过。

毕竟那是老项目了,很多仓库都不给下了,但是还得继续用,只好继续解决问题。

下面是完整的错误

What went wrong:
A problem occurred configuring project ':httplib'.
> Could not create task ':httplib:greendaoPrepare'.
   > Could not generate a proxy class for class org.greenrobot.greendao.gradle.DetectEntityCandidatesTask.

我们把目光定在org.greenrobot.greendao上。

解决方案:

全局搜索org.greenrobot.greendao,搜索出来在httplib的module上引入了

implementation 'org.greenrobot:greendao:3.2.0'

然后在项目外层的build.gradle写的是

classpath 'org.greenrobot:greendao-gradle-plugin:+'

坏就坏在这个加号上。你不知道它这时去下载什么版本了。我们得给它指定版本,改为3.2.0就好。
如下

classpath 'org.greenrobot:greendao-gradle-plugin:3.2.0'

重新rebuild项目就好了。希望能帮到你们

上一篇下一篇

猜你喜欢

热点阅读