[Android 開發] 如何把 Eclipse 專案轉移到 Android Studio?

如果你是 Android 工程師,那麼你要注意的是,Android Studio 已經成為官方指定的開發工具了,目前許多人都還是使用 Eclipse 的開發方式,不過將來勢必有一天一定要將專案轉移至 Android Studio 來進行開發。而如果將原本的 Eclipse 專案匯出至 Android Studio 呢?其實很簡單,只要依下列的方式就可以了。

 

在使用 Android Studio 前,可以先「從本站下載 Android Studio」,並且觀看基本教學,當然最後會出現觀迎畫面,理論上是要選擇【Import Non-Android Studio Project】,不過先不要動作,先打開 Eclpise 或是 ADT Bundle

how-to-transfer-eclipse-android-project-to-android-studio-6

 

接下來,按下主選擇的【File】→【Export】,並選擇「Generate Gradle build files】來匯出專案。

how-to-transfer-eclipse-android-project-to-android-studio-9

 

接下來,選擇要匯出的 Project,並且進行匯出,匯出之後會得到一個「.Gradle」的檔案。

how-to-transfer-eclipse-android-project-to-android-studio-10

 

接下來,再按下 Android Studio 第一個畫面中的【Import Non-Android Studio Project】後,再按下〔Import Projcet from external model〕,記得選「Gradle」喔!
how-to-transfer-eclipse-android-project-to-android-studio-7

 

之後,再選擇「Gradle Project」所在的位置及檔案。

how-to-transfer-eclipse-android-project-to-android-studio-8

 

之後,就會匯入成功啦,接下來就是修正錯誤囉!由於 Eclipse 和 Android Studio 的特性不同,想必會有一堆錯誤等著修正,就請工程師們好好加油啦!
how-to-transfer-eclipse-android-project-to-android-studio-13

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments