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

B-side product operations: a guide to avoiding pitfalls in demand management

The methods of demand collection, analysis, and i...

Which cooking oil is the healthiest? | 117三行

Eat a variety of oils at the same time, don't ...

The era of smart TV aggregation may come with more than 100 million users

As an important output screen for home entertainm...

Yuanfudao Children's Programming Course L1+L2

LEVEL1 Course Content Introduction Based on face ...

Interpretation of APP visual rules: What are the Gestalt psychology rules!

We often hear some design experts share with us t...

Can you still pee properly? So many people have overactive bladders...

Leviathan Press: It is estimated that many people...

Lumia1020 try to play the voice of the girl

Microsoft released the new Windows Phone 8.1 opera...

When did elephants disappear in Zhejiang?

In August this year, we were delighted to hear th...

How to optimize Google search ad keywords?

I believe everyone knows the importance of Google...

How to write good copy? Learn these 17 methods!

1. First you need to digest the information about...

How can SEM managers perform data analysis and SEM management?

For KA accounts with annual consumption of more t...