I am trying to add a dependency of Android Asynchronous Http Client into my project. So there are two build.gradle files are there in the project.
About relation of the two gradle files, hrskrs made a very clear explanation,I will make some supplement about it.
if your project only has one Module (such as app),the advantage of top build.gradle(Project:My-app) not show very clear. because you can config everything in build.gradle(Module:app) about the Module,and only modify one file when upgrade in following days。
but if your project has 5 Modules,and it happened that they have a same dependence A, if you dont use the top build.gradle(Project:My-app) you need maintain 5 files in following days.
by the way ,the build.gradle(Module:app) can overwrite the build.gradle(Project:My-app).
This design can improve the maintainability of APP