Import an open-source project to Android studio
I downloaded an open-source project from github a few days ago and found that it is not the directory structure of Eclipse.
It is the file directory of android studio recently used. The word gradle appears multiple times. The combination of Android Studio and Gradle is very convenient to use, and many third-party open-source projects have been migrated to Studio. So let's take a look at this combination.
1. What is gradle?
Gradle is based on the groovy language and mainly oriented to Java applications. An automated build tool based on the DSl domain-specific language) syntax. This Is What Baidu encyclopedia explains. In my personal understanding, we can regard it as a tool for building our projects or projects. Therefore, do not think that it can only be used together with our android studio. For the previous development tool Eclipse, gradle is also possible. The default build project tool for android studio is gradle.
2. Import android studio
In the face of such an open source code downloaded from the Internet, how can we import it into our development tools. If you want to import it to Eclipse, We need to download and install the gradle and groovy plug-ins by ourselves. Here, we still use android studio as our development tool.
2.1 First, open our android studio
If you have another project, close it. Here we select import Non-android studio project.
Select the corresponding open source code. Click OK
Error Message
This error indicates that gradle is not downloaded. At this time, click the gradle option on the right side of android studio.
The pop-up window shown in
Click the plus sign to display a directory selection window. Select build. gradle under the project directory to be imported.
In the displayed window, click OK.
The window shown in is displayed.
Download the required gradle. FQ is required. Download speed is slow.
After the download is completed, our project will be imported. Gradle is also a beginner, and some content in it is still being studied. I also hope to communicate with you.