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