When writing a demo, there is a problem as follows:
Failed to notify build listener.
When searching on the Internet, it’s all about the current gradle problem. What is the specific problem?I found one of the Blogs:
https://blog.csdn.net/Evan_ L/article/details/87368075
What I’m saying is that the current gradle version supported by Android studio may not be consistent with the version you expect to use in your project and development tools.
So how do we check?We can carry out the following steps:
1. Check the gradle version you expect to use, and enter gradlew – V in terminal in Android studio. (if you have configured gradle environment, enter gradle – V in CMD) as shown in the figure below:
You can see that my version number here is 5.1.1.
2. Check the gradle version supported by your current Android studio. The location is the gradle folder in your Android studio directory. As shown in the figure:
You can see that I support 4.6 here. So to sum up, my initial judgment is that my expected gradle version is too high. So I need to make my gradle version a little lower to meet the needs of my android studio. How to change it
Here, just change your gradle version to the latest version supported by Android studio. After the change, remember to change the version number of the gradle plug-in, otherwise there will be problems. As shown in the figure:
Remember that the version number of the plug-in here must be changed to correspond to the version number of gradle. The specific corresponding relationship can be viewed on Android’s official website. Here is a link:
https://developer.android.google.cn/studio/releases/gradle-plugin.html#updating-plugin
Then, after the version number is mapped, you may need to change some dependent version numbers. Just follow the prompts. I can only say that’s how my problem was solved. I hope I can help you. Of course, what I said may not be right. I hope Daniel can see it and don’t laugh at us.
If you find that there may be something wrong with my blog, you can check this:
https://blog.csdn.net/qq_ 21397217/article/details/65630730
Read More:
- Error:Failed to notify project evaluation listener.
- Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes
- How to Fix adb_server_notify: ADB server connection failed
- Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently
- Failed to set up listener: socketexception: address already in use
- rabbit.listener.BlockingQueueConsumer$DeclarationException: Failed to declare queue(s)-2021-10-09
- NPM run build failed to package err! Missing script: build
- Commandinvocationfailure: failed to build APK problem record
- failed to find Build Tools revision 23.0.2 Install Build Tools 23.0.2 and sync project
- Failed to build bottleneck ERROR: Could not build wheels for bottleneck which use PEP 517
- Failed to find Build Tools revision 27.0.3
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- gradle:failed to find Build Tools revision 29.0.2
- Prompt IPA processing failed when exporting IOS adhoc
- Solution to Tomcat starting error listener start
- Request processing failed;nested exception is java.lang.*
- Project error – failed to find build tools revision 26.0.1
- Vue element UI uses this. $notify is not a function problem resolution using the notification box
- Solution: unity package failed. Commandinvocationfailure: gradle build failed
- Failed to find Build Tools revision 25.0.2