FAQs about importing Android Studio to GitHub (Taking image carousel as an open-source project as an example)

Source: Internet
Author: User

FAQs about importing Android Studio to GitHub (Taking image carousel as an open-source project as an example)

Github is undoubtedly a treasure for developers, but it is not a simple task to use it. problems may occur when importing open-source projects using Android studio, today, I will take an image carousel project on github as an example to solve common problems during the import process.

 

1. Download the compressed project package
2. Because android studio is automatically built using gradle, inconsistent gradle versions of each project may cause compilation exceptions, You need to modify the gradle version of the open-source project as follows:

Open the build. gradle file under your local project and copy it all.

 

Use notepad or other software to open the build. gradle file under the open-source project, paste it all and save it.

 

 

3. import the open-source project, File ---> import project. Note that you do not select the entire folder, but find the build. gradle File in the folder and click OK.

 

4. Solve the first exception

Exception display:

 

Solution: Open the build. gradle file in the folder shown by the arrow and change runProguard false to minifyEnabled false.

 

Cause:

Open the Directory and you will find that your gradle version is 2.2.1. According to the official document, after gradle version 2.0.0, unProguard will be changed to minifyEnabled.

 

5: solve the second exception

Exception display:

 

Solution: Open the xxx. iml file in the directory and delete the code in the red box on the right.

 

6. Resolve the third exception:

Exception display: class file display J (not recognized by android studio)

 

Solution: select an SDK version and Rebuild the Project.

 

7: exception solving, operation, the world is so beautiful

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.