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