Import projects from Eclipse to Android Studio

Source: Internet
Author: User

ADT is a bit outdated, and now the more popular Android development tool is Android Studio, which Google has been promoting.

Recently installed as, from the previous ADT migration project to as on, encountered a lot of obstacles.

Focus on the following two points:

(1) The file path must be in English, if the file path contains Chinese error:

Your project path contains non-ascii characters.

(2) When selecting a file, you must select only the file containing the androidmanifest.xml, not the entire project file.

Otherwise an error may be androidmanifest.xml doesn ' t exist or has incorrect root tag

I copied the import process from the official website, one that was imported as project and the other as module, as follows:

FQ can look at the official document: Https://developer.android.com/studio/intro/migrate.html#android_studio

Import as a project:
    1. Start Android Studio, and close any open Android studio projects.
    2. In the Android Studio menu, click File > New > Import Project.
      • or click Import Project (Eclipse ADT, Gradle, etc)in the Welcome screen.
    3. Select AndroidManifest.xml the Eclipse ADT project folder that contains the files and click Ok.
    4. Select the destination folder and click Next.
    5. Select the Import option and click Finish.
    6. During the import process, you are prompted to migrate any library and project dependencies to Android Studio and to add dependency declarations to the build.gradle file. For more information about this process, see Create an Android library.

      Any well-known source code libraries, binaries, and JAR files with known maven coordinates will also be replaced with MAVEN dependencies during the import process, so you don't have to manually keep these dependencies. The import option also allows you to enter the workspace directory and any actual path mappings to handle any unresolved relative paths, path variables, and linked resource references.

7.Android Studio imports the app and displays the project import summary. Review the summary to learn more about the project reorganization and import process.

After you import your project from Eclipse ADT to Android studio, each app module folder in Android Studio contains the complete source code set for that module, including src/main/ and src/androidTest/ directories, resources, build files, and Android inventory. Before you begin application development, you should resolve any issues that are displayed in the Project import summary to ensure that the project reorganization and import process is completed successfully.

Import as module:
    1. Start Android Studio and open the project for which you want to add a module.
    2. In the Android Studio menu, click File > New > Import Module.
    3. Select AndroidManifest.xml the Eclipse ADT project folder that contains the files and click Ok.

    4. If necessary, modify the module name and click Next.

    5. During the import process, you are prompted to migrate any library and project dependencies to Android Studio and to add dependency declarations to the build.gradle file. For more information about migration library and project dependencies, see Creating an Android library. Any well-known source code libraries, binaries, and JAR files with known maven coordinates will also be replaced with MAVEN dependencies during the import process, so you don't have to manually keep these dependencies. The import option also allows you to enter the workspace directory and any actual path mappings to handle any unresolved relative paths, path variables, and linked resource references.
    6. Click Finish.

Import projects from Eclipse to Android Studio

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.