Using third-party jar packages in Android Studio, you can download them directly and add them to your project, or you can manage them using the Gradle configuration. The graphical interface is very simple.
Click the middle icon, or select Model, press F4
Select the Dependencies tab after opening the Project Structure panel
Click on the + sign, select 1 Library dependency, we download Google-provided Gson.jar package from the Internet server
Enter the name of the jar package you want in the text box of the popup box, preferably the package name. Click the Find button on the right, and if the default server is available, the required jar package will appear in the list.
Finally click OK, wait for Gradle download compile. Sometimes the wait is longer and you can stop trying again.
Android Studio uses Gradle to configure project-required jar packages in the graphical interface