Probably a stupid question, but I could not find this file. Please tell me where you can find it, many newbies do not understand commonplace things.
Well, in general, I'm looking for him because of the error

Error:(4, 23) java: package org.apache.http does not exist 

Google prompted to add the following line to build.gradle.

 android { useLibrary 'org.apache.http.legacy' } 

Are there any thoughts, did I understand correctly and did I find the solution?

3 answers 3

In the "Project" section, you select the type of Android display, there you open the "Gradle Script" section and there will be 2 buld.gradle files, you need the buld.gradle (Module: app) file, and this is the desired file. When working with gradle files more carefully, because if something is wrong, then your project simply will not build.

    Display type is 'Android', tab 'Gradle Scripts'.

    file

    • I do not have such a section. How to install it? - Albert Ushakov
    • @AlbertUshakov It should be like a column on the left side, about a quarter of the screen wide. Maybe he is just hidden. On the left side of the studio there is a narrow vertical panel (as in the screenshot) and there click on "1: Project" - Pollux

    You can find it in the folder with the project and without AndroidStudio, and in AS you can in the side tab

    enter image description here