Android Studio Import Project and module, take project on GitHub as an example

Source: Internet
Author: User

1. Import as Project

Create a new project a locally, the project directory is as follows

Item B on GitHub, project catalog is as follows

Replace the four files/folders of the locally created project A with the same content from GitHub on item B, and select Build in the root directory of Project B through Open an existing project or File/new/import project mode After you import the. gradle file, modify the Build.gradle:1 in the module. Compilesdkversion, Buildtoolsversion, minsdkversion, targetsdkversion change to the local SDK corresponding to version 2. Comment out irrelevant applicationid, apply plugin: ..., apply from: ..... such as the following error occurs

Check the build.gradle in the root of the project, remove the android {compilesdkversion buildtoolsversion ' 23.0.3 '} Note: as when importing the project, it will automatically find if there is a project configuration file in the SDK version, the above code 2 will be added to the Build.gradle in the project root directory. Import as Module 1) method one: By File/new/import module, select the module folder in item B (i.e., duplicate the folder name, rename it, such as: Module2); method Two: Direct the Modul in Project B  E, the App folder in the copy to local project A, such as duplicate folder name, rename it, such as: MODULE22) Modify the Settings.gradle in the root of the project A, add the Modole2:include ': App ', ': Module2 ' (Settings.gradle in the project root directory is set to Gradle, including all module) 3) synchronization Gradle

Android Studio Import Project and module, take project on GitHub as an example

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.