25 April 2012

How to import android project from rubish Eclipse to awesome Intellij IDEA?

Info: Solution for people who just started using IntelliJ IDEA and start first project from move project from Eclipse.
Solution works for   IntelliJ IDEA 11.0 , 11.1.1  (it make works in other versions too)

Are you fed up with Eclipse and you want try  Android  development  on IDEA ?
How to move project from Eclipse to IDEA ?
Well... it is almost straight forward....

  1. Download and Install Android SDK from http://developer.android.com/sdk/index.html .
  2. After you installed,  Run SDK Manager . (Android SDK Tools/SDK Manager  in menu start or similar place in other OS).(Choose everything what is revelant to you or everything if you have no clue).
  3. run IntelliJ IDEA and ... surprise suprise press ... New Project. (if you wondering why ,look on bottom of note)
  4. Select Create project from scratch and press Next
  5. Fill details about your project (and remember to choose Android Module from Select type) and press next
  6. Specify do you want source directory and where or not (i always choose createdsource directory called 'src'
  7. If  IntelliJ IDEA  asked you too choose JDSK choose your JDK path  (Default path:  C:\Program Files\Java\jdk{version} or  C:\Program Files(x86)\Java\jdk{version}  or similar path for other OS). and press Next.
  8. Select Android SDK and  Choose a New platform   (Default path:  C:\Program Files\Android\android-sdk) . Select Target Device and press Finish
  9. Now  . File / Open Project. Select path your Android project and it should works.(You maybe be ask for select platform and etc.) 
Step 9 is bit a unclear,but i will update this note soon


 * WHY I NEED CREATE A NEW PROJECT,WHERE I WANT IMPORT EXISTING PROJECT FROM ECLIPSE ???
It is odd bug in IntelliJ IDEA, that prevent you from setup correctly android sdk correctly,but you can setup everything smoothly

Sources:
http://stackoverflow.com/questions/5271182/how-do-i-set-up-intellij-idea-for-android-application
http://www.jetbrains.com/idea/webhelp/importing-eclipse-project-to-intellij-idea.html