AndroidStudio · gradle报failed to notify build listener

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/Maiduoudo/article/details/99632534

错误信息:

Failed to notify build listener

问题分析:

          Gradle版本问题导致的项目无法构建。

gradle5.0和android studio3.2不兼容的问题,别人给出的解决方案是升级android studio到3.3R,但是更建议使用4.10版本的gradle

I am migrate to ver android studio 3.3R and to this moment I do not have problem with gradle 5.0, but I recomende you to build your project with gradle ver 4.10.
How m-r Jacomet write, Gradle NOT compatible with Android Studio 3.2.
To IntelleJ IDE, I see that they have a big problem with visual component preview, must write every time for new name on Theme listing (Base) or change name implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'...to alpha1..
To my self only, I think my be, If Gradle is not compatible with Android Studio and Intellj why thy do it Gradle?
For render problem intelliJ for android developer
Check your build.gradle (Module: app) file and change:
compileSdkVersion 28
targetSdkVersion 28
To:
compileSdkVersion 27
targetSdkVersion 27

之后重新sync即可,如果遇到了卡在indexing pause due to batch update的问题,单击该进度条右侧的播放按钮即可

在这里,项目的gradle版本要和你的AndroidStudio版本一致。

如下:

1.           gradle-wrapper.properties文件修改distributionUrl=....

                                          


2.  项目的build.gradle 修改gradle的版本。这里使用v3.2.0

                    

                                                             

以上即可解决这个问题。

猜你喜欢

转载自blog.csdn.net/Maiduoudo/article/details/99632534