Android Studio gradle compilation prompt ‘default not found’ Solution
When importing studio project, when performing sync, prompt
Error:Configuration with name 'default' not found.
Because I was not familiar with gradle before, I didn’t find the reason. In fact, I was lazy and did not check the problem seriously. Today I encountered it again, so I struggled for a while and opened all the configuration files to read. Finally, I solved the problem. I found that it was a low-level problem that could not be low-level, so I recorded it and warned myself.
1. OpenI found that there are many include such as include ':app'. However, I found that there are no include projects in the project directory, so I added the projects that need include. If the include project is not needed, delete the include statement directly and try again sync.
2. Follow the above operation, either add the corresponding inlcude project, but you will still prompt this if you find it.default not foundStatement, what's going on? It turns out that each project compiled with gradle must haveOnly by using files can you compile the include project. Only when the entire project is sync-passed. Add the corresponding gradle configuration files to the include project, and then re-sync, and the entire project will be passed.
I finally dealt with this problem. In fact, this problem is a very simple problem. I just blame myself for being ignorant at a young age. Therefore, I will record these mistakes that I once ignorant. When I look at it in the future, I may just smile.
Thank you for reading, I hope it can help you. Thank you for your support for this site!