Android studio default not found error resolution

Android studio gradle compilation prompt 'default not found' solution

When importing a studio project and performing sync, you will be prompted

Before, I was not familiar with gradle, so I didn't find the reason. In fact, I was lazy and didn't seriously investigate the problem. Today, I met it again, so I tossed around for a while, opened all the configuration files, and finally solved the problem. I found that it was a low-level problem, so I recorded it and warned myself.

1. Open settings.gradle and find that there are many include ': app'. However, it is found that there are no include items under the project directory, so add the items that need to be included. If the included items do not need to be included, delete the include statement directly and try sync again.

2. According to the above operation, either add the corresponding inlcude project, but you will still be prompted with such a default not found statement. What's the matter? For the project originally compiled with gradle, there must be a build.gradle file under each project to compile the include project. The whole project can sync through. Add the corresponding gradle configuration file to the include project, and then sync again. The whole project has passed.

Finally, I got rid of this problem. In fact, this problem is a very simple problem. I just blame my youth and ignorance. So now I record these once ignorant mistakes. In the future, I may laugh it off.

Thank you for reading, hope to help you, thank you for your support to this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>