Android studio import open source project

Android studio import open source project

I downloaded an open source project from GitHub a few days ago and found that it was not the same directory structure as Eclipse before.

It is the file directory of the Android Studio that I have been using recently. From the above picture, we can see that the word gradle appears many times. The combination of Android Studio + Gradle is very convenient to use, and many third-party open source projects have already migrated to Studio, so let's learn about this combination together.

1. What is gradle

Gradle is based on the groovy language and is mainly for Java applications. It is an automated build tool based on DSl (domain specific language) syntax. This is the explanation from Baidu Encyclopedia. From a personal understanding, we can regard it as a tool for building our projects or engineering. So don't think that it can only be used with our Android studio. Gradle can also be used for the previous development tool Eclipse. It's just that the default tool for building projects in Android Studio is Gradle.

2. Import into Android Studio

Faced with such an open source code downloaded from the Internet, how do we import it into our development tools? If you want to import it into Eclipse, we need to download and install the gradle and groovy plug-ins ourselves. Here we still choose Android Studio as our development tool

2.1 First we open our android studio

If you have a project before, just close the project. Here we choose to import Non-android studio project.

Select the open source code we downloaded. Click OK

error message

This error prompts us that gradle has not been downloaded. At this time, we click the gradle option on the right sidebar of android studio

A pop-up window appears as shown below

Click the plus sign, a window for selecting a directory will pop up, select the build.gradle in the project directory we want to import

A window as shown below appears, click OK.

A window as shown below pops up

Download the gradle we need, which requires FQ. The download speed is slow.

After the download is complete, our project is imported. I am also a beginner in gradle, and I am still learning some of the content. I also hope to communicate with you.

<<:  Create an APP in four months from zero foundation

>>:  Why is the image quality on Android not as high as on iOS?

Recommend

Virtual Reality Entrepreneurship: How long will it take to see spring?

Virtual Reality (VR), a field that is somewhat un...

Nine tips for early stage app brand building

Although the author is not an expert, he comes fr...

Baidu advertising plans are all here!

Friends still keep asking about Baidu information...

4 core methods for event operation and promotion

There are activities on today’s e-commerce platfo...

If you see a numbered butterfly, post it online immediately!

This year, Guangzhou has experienced the longest ...

Touch: The multiple meanings of moss

Moss-covered trees in Devon, England. © Adam Burt...