0

So, as it seems that more and more people are using Android Studio i got curious and wanted to take a peek at it.

I have used Eclipse up until now and wanted to migrate a project to Android Studio. So i exported a gradle buildfile from within Eclipse, as android.developer.com suggested.

That worked fine, now i wanted to import that into Android Studio 0.3.2

When trying to import i got that Unable to import Eclipse project to Android Studio error. Now it is building.

But it got a new suprise, now before it is finished building, its asking specifically for an older Version of Gradle(1.6)... Ok, i can do that. Which leads me right back to the first error. So i tried this - Gradle version 1.6 is required. Current version is 1.8-20130730220035+0000

I can however create a New Project with Android Studio.

I've tried this for about an hour now and im getting sort of pissed, because it doesnt seem to know what it wants. Is it some sort of Bug or did i make some sort of mistake.

Community
  • 1
  • 1
Daniel Bo
  • 2,518
  • 1
  • 18
  • 29
  • If nothing helps and your project isn't that big yet you can copy and paste your classes and drawables into a new project. Is not very nice to do but it helped me once as I wasn't able to migrate one of my projects to AS. Strangly the import of the other ones worked without any problems.. – Endzeit Jan 29 '14 at 17:09
  • Android Studio is "early access preview," which isn't even beta. It's been described by seasoned Android developers as "hostile." IMHO, you're wasting your time, if you're trying to actually get development done. – 323go Jan 29 '14 at 17:10
  • i just wanted to have a look at it. Besides why would you downvote that Question? – Daniel Bo Jan 29 '14 at 18:26

2 Answers2

1

You're using a very old version of Android Studio. I'd recommend upgrading to 0.4.3. Versions later than 0.4.0 allow direct import of Eclipse projects instead of requiring you to do the cumbersome (and as you've seen problematic) export of projects from Eclipse; it's smarter about setting up the right plugin and Gradle versions. 0.4.3 has some important bugfixes over 0.4.0-0.4.2.

Scott Barta
  • 79,344
  • 24
  • 180
  • 163
  • hm ok, valid point. i didnt check current version, since i downloaded the copy just today and assumed its up to date – Daniel Bo Jan 29 '14 at 18:24
  • 0.4.3 installation instructions/link: http://tools.android.com/download/studio/canary/0-4-3 – Sam Dozor Jan 29 '14 at 21:55
0

I've just migrated my projects. Here is two suggestions from my side.

  1. Take the latest Android Studio.
  2. Do not export / import projects from Eclipse. Most likely you are going to have errors in the project after this step. Starting from a clean project, which builds, will safe you a lot of time and avoid unnecessary frustration.
  3. Create an empty Android Project in Android Studio. It must build without errors (⌘ F9). The start to enhance it using official Gradle Plugin user guide.
  4. Create libraries folder and add all libraries in there one by one. Update build.gradle dependencies as mentioned in user guide. Make sure everything builds successfully.
  5. After all libraries build you can copy-paste sources, resources and assets from Eclipse project to corresponding folders of Android Studio project. Make sure everything build as expected.
  6. Now you can start with more advanced configuration like ProGuard configuration, release certificates etc.

I've done it in a couple of hours. Hope this helps you too.

sergej shafarenka
  • 20,071
  • 7
  • 67
  • 86