Migrating an Eclipse project to Android Studio

Source: Internet
Author: User
Tags android sdk manager

Recently, when debugging, Eclipse always appears unresponsive, restarts n times, not only delays the work and is also upset, so this two days to migrate the project from Eclipse to Android studio, here to record the operation steps and the various problems encountered.

1. SDK Upgrade

First upgrade the ADT plug-in to the latest, with a minimum of 22.0

2. Exporting projects from Eclipse

First select the project to export in Eclipse, right-select "Export ...", open the Android folder, select "Generate Gradle Build Files", click Next, will prompt you Android Studio will replace the previous Eclipse project, click Next to select the item you want to export, click Next and click Finish.

The steps are as follows:




3. Import the project into Android Studio

Open Android Studio on the Welcome screen, if you have previously opened the project then close back to the Welcome screen, select "Import Project (Eclipse ADT, Gradle, etc.)" The file selection dialog will pop up, select the project folder you exported from Eclipse and click OK to download the relevant content

Configured, waiting for a period of time after the configuration is complete, the project interface is entered.













4. Error Resolution

There may be some problems with the newly imported project, such as coding, formatting, etc.

(1) Question: Error: (1, 1) Java: *.java:1: illegal character: \65279

Solution: Put the corresponding file into the notepad++, select the encoding format is "Utf-8 No BOM format encoding"

(2) Questions:

Workaround: This kind of problem is the method parameter does not correspond, deletes the unnecessary @param

(3) Issue: Android SDK Manager cannot update

Workaround: Open the Android SDK Manager, open its settings interface, set the agent, Server:mirrors.opencas.cn port number: 80 details as follows:


(4) Questions: Res/drawable-hdpi/album.png

Error:Error:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process ' Command '/applications/adt-bundle-mac-x86_64-20140624_1/sdk/build-tools/21.1.2/aapt ' finished with Non-zero exit Value 42

FIX: Update SDK Tools

Migrating an Eclipse project to Android Studio

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.