Reputation: 3161
Android Studio 0.4.0
I tried to import eclipse project directly (not exported eclipse project as "generate gradle build files") and tried this migrating soliution. The result of both ways is like this:
Is this good project structure? And if it is not how to migrate Eclipse project to Android Studio?
Andriod Studio import log
Google repository is installed
P.S. Some Android associated buttons in toolbar are inactive after project import.
Upvotes: 4
Views: 12827
Reputation: 3441
This link maybe helpful :
How do you import an Eclipse project into Android Studio
- The root directory of the project you import must have an AndroidManifest.xml file.
- Either: The root directory must contain the .project and .classpath files from Eclipse or The root directoy must contain res and src directories.
Upvotes: 0
Reputation: 17139
No, that is not a good project structure. After you have generated gradle build files, make sure the project can built properly from command line using gradle. To build a project run gradlew.bat
or gradlew
from project root. You may encounter one or more errors, I've posted fixes for some commonly encountered errors here. After fixing all errors try importing to Android Studio again.
Upvotes: 0
Reputation: 80020
Looking at your log file, I see this:
com.intellij.openapi.externalSystem.model.ExternalSystemException: Could not find any version that matches com.google.android.gms:play-services:+.
Required by:
kmvts-rb-1.1.0:app:unspecified
which means that it can't find the Play Services repository. In your SDK Manager (click on the button in the Android Studio toolbar; that will ensure you open the SDK Manager for the copy it's using to build your project), install the Google Repository. Now you should be able to import your project.
We're working on having much better handling of this situation in the future, but for now you have to know to install it yourself.
Upvotes: 1
Reputation: 766
I found that the easiest way to import from Eclipse to Android Studio, is to use File -> Import project
, select the project to import from your file structure then use create project from existing sources
and select Eclipse.
If you are used to the Eclipse key bindings, Android Studio/Intellij IDEA will also let you change your keyboard binding configurations to the default eclipse ones. To do this, use Settings -> IDE Settings -> keymap
and select Eclipse from the drop down menu at the top.
Upvotes: 0