Error:Cannot configure the 'publishing' extension after it has been accessed

拟墨画扇 提交于 2019-11-29 01:34:43

I have faced the same issue after upgrading to latest studio.

I am not sure about the root cause but what I did is

comment below line from volley build.gradle

apply from: 'bintray.gradle'

As I can see there many project are there in you dependencies. If possible comment same from all and try syncing again.

Same thing happened to me.

I am not a Gradle expert but my solution was a little bit less drastic. I just edited the bintray.gradle file by moving the line:

apply plugin: 'maven-publish'

just before the publishing action.

This problem seems to be related with this:

https://github.com/researchgate/gradle-release/issues/125

GeorgeBinDragon

This error comes from volley module, I solved this problem by doing as follows: open volley module, find bintray.gradle file and change

publishing {
   publications {...}
}

to

publishing.publications {...}

then it will work just fine.

I got this now when I introduced a circular dependency among modules inadvertently, in case some one hits it in the future.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!