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

后端 未结 4 492
伪装坚强ぢ
伪装坚强ぢ 2020-12-15 22:31

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

I am getting this error after updating my android studio.

this is my app.grad

相关标签:
4条回答
  • 2020-12-15 23:07

    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.

    0 讨论(0)
  • 2020-12-15 23:08

    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

    0 讨论(0)
  • 2020-12-15 23:13

    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.

    0 讨论(0)
  • 2020-12-15 23:18

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

    0 讨论(0)
提交回复
热议问题