Android Studio 0.4.3 Eclipse project without gradle - android

Prior to this version it seemed easy to open an eclipse project as-is in Android Studio without any conversion. I prefer the Android Studio environment, but am working on a project that uses eclipse as the main IDE. I'd rather not have to download the eclipse bundle just for this one project.
Is there any way to open an eclipse project as-is, without conversion to the gradle build system, in Android Studio 0.4.3?
EDIT:
It appears that if you use Android Studio's download from source control feature, it'll let you open the project that way. But what if I already have the source downloaded? I don't want to remove it just to redownload it again. It seems like this option has disappeared from the main 'import' wizard.

We're strongly encouraging users to move toward the Gradle build system, and we're in the slow process of making that the only way to create new projects in Android Studio -- you're seeing this now on importing Eclipse-based projects. We'd like to replace all other build systems in use with Gradle, including Ant and the Eclipse internal builder, though the latter two are farther out on the roadmap.
If your ultimate goal is to move to Android Studio, then you might want to reconsider and just set up a Gradle build file. You don't have to adopt the Gradle-style multimodule project structure (which the current Eclipse importer imposes upon you by making a copy of your project); you can rework your build.gradle file to use the Eclipse-structured project in-place. You can get a good start on this if from Eclipse you use the feature to export your project to Gradle build files. It will set up the project in that fashion, though that feature in ADT is a little out of date and you'll need to update the version of the Android Gradle plugin in the build file and the Gradle version in the wrapper that it outputs.
I think this may actually solve your problem. IntelliJ or Android Studio have never been able to use the Eclipse project directly -- they've always imported the Eclipse project and converted to an IntelliJ-style project, and if you later change the Eclipse project, you'll need to re-import into IntellilJ-land. I'm guessing your real desire is to use the Eclipse project in Android Studio without having it make a copy and converting into its preferred directory structure. (By the way, we'll eventually improve Eclipse-to-Gradle import to lift this restriction).
Once you have the Gradle build file in place, you can use it when working with the project in Android Studio, and you'll still have the Eclipse project files when working with it in Eclipse. The big drawback is that you'll have to keep them in sync as you change dependencies and project structure, but hopefully that doesn't happen too often. Even if you weren't using Gradle, you'd still need to keep both projects in sync anyway, so Gradle isn't costing you anything there.
Having said all that, it doesn't directly answer your question, which is how to use the your project without Gradle.
Once you have an IntelliJ-built project, you can open it in Android Studio and use it normally without migrating to Gradle (though I think it does show you a popup when opening the project recommending you do so; you can ignore that). What you need to do is to get that initial IntelliJ project, and once you have it, check all the .iml files into source control -- those .iml files contain all the project information. To get those files, you'll need to import the Eclipse project either in IntelliJ CE, or in Android Studio prior to 0.4.0. Then you'll have your .iml files -- hang on to them.
I'll point out that if you're using Gradle as your build system, we recommend that you don't check those .iml files into source control. There, the build.gradle files are the source of truth for project structure; the fact that Android Studio creates .iml files at all is an implementation detail that reflects that internally Android Studio is still treating this project as an import instead of deriving structure from the Gradle files directly (and we resynchronize state when we know we need to). But saving those .iml files into source control or modifying them directly will lead to confusion or loss of any changes you make there when it resynchronizes.

I think you should give a try to Intellij Idea with ADT Plugin instead of Android Studio, if such requirements are there. Intellij IDEA will support both type of Android projects.
What If I want to move to Android Studio completely sometime?
There is nothing new in Android Studio it is just an IDE based on Intellij IDEA. You can easily switch between Intellij IDE and AS anytime. The only thing is to learn in AS is the new gradle build system. IDE related most of the features are there in Intellij IDE as well.
If you want to move Android Studio start using gradle Build System. That is only the main power of new Tools.
As per your question you don't wanna move your project in gradle then you can have both IDE together like Intellij IDEA at place of Eclipse and Android Studio as well. Msot of the Developer including me having Eclipse along with Android Studio.
EDIT :
I found a workaround to import Eclipse project in Android Studio but I will not recommend you to do this
Look at my answer here
Not Use Gradle In Android Studio

Related

How to import an Android Studio project from android.googlesource.com?

I'm trying to open the DeskClockApp (https://android.googlesource.com/platform/packages/apps/DeskClock/) in my version of Android Studio. However, since no gradle files are downloaded, Android Studio is struggling to see the project as an Android-Gradle app.
I've tried downloading the source code as a zip, importing it as Git from Android Studio's VCS, etc. The online repository doesn't have the gradle files b/c the developer added a gitignore for gradle (makes sense). I also considered adding the gradle files myself but the project structure seems to be slightly different than the structure defined online. When I first import that project it says Android Framework detected, however, on configuring it for Android it cannot find any module to run, or even display the correct files (in the Project view). Is there any way to generate the correct gradle files for this? Maybe run it without gradle?

Import maven project from Eclipse to Android Studio

I have a very complex maven project in Eclipse with many modules and submodules and a lot of dependencies to each other and to third party files in pom.xml files. It works well in net browsers. But how can I try it in PC within an Android phone emulator? I have found this Android Studio program, but how can I import my very complex maven project from Eclipse without adding extra file(s) to it (like AndroidManifest.xml,etc) and not to destroy the original structure of the project?Anyway, I could use the File/Open option from menu and I can see the project in AS, but I can't run it. What should I do to run?
If you are trying to migrate an Android application from Eclipse IDE to Android Studio, then the hard truth is there is no easy way. I know because I already did this and it was worth the move.
And if you decide to take the hard route you will need to fully understand the directory structure of your Eclipse project compared to the directory structure of Android Studio projects and how the two IDEs build and deploy the project - because they are totally different and Android Studio uses gradle for its build.
Try reading through the Android Studio Guide and the Migrate to Android Studio from Eclipse.

Android - how to export eclipse project with libraries to android studio

my tries
click right at my project , choose Export ---> android
---> Generate Gradle build files
I stop in this point , I cant force overriding, any one know the reason
The Eclipse IDE uses a different file structure for their android projects, as opposed to the files structure of the projects created through Android Studio. Regardless of the Gradle builds and so on.
Your best bet would be to create a new Android Project based on the specifications of your Eclipse project. And migrate the source code as required. As far as the libraries are concerned, you can add them directly to the Android Project.
I also found that this might be useful for your current situation. Help on Migrating from Eclipse to Android Studio (Projects).
Hope this helps.

Migration from Eclipse to Android Studio

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.
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.
I've just migrated my projects. Here is two suggestions from my side.
Take the latest Android Studio.
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.
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.
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.
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.
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.

Exporting an eclipse project as gradle

I have been trying to export my eclipse project as a gradle build file to use it with Android Studio but I can't seem to make it work correctly.
When I click "Finish" nothing happens. If I repeatedly click it, I can see a progress bar that shows for a millisecond and then vanishes.
My ADT is version 22.3 (which is the latest) and I have tried all of the solutions I found on google as well.
Similar questions can be found here:
Eclipse Gradle export of Android project does nothing
Cannot generate gradle.build files from Eclipse
As you can see, there is not really a solid solution for this problem, but people wrote they created it manually. I don't know how to do so though.
Is there any solution for this problem that I haven't heard of? If not, how can I create the file manually?
Apparently, the current edition of the export-to-Gradle support in Eclipse cannot handle a project that is attached to an Android library project. In that case, you would need to (temporarily) detach the Android library project, export the main project, then modify build.gradle to use the library project (manually or via Android Studio).
Generating build.gradle files FIRST FOR ALL of the projects in my dependencies ONE AFTER ANOTHER worked for me.
I generated build.gradle (with export wizrd for facebook, play and whatever other projects I imported and used in my project).
For not trivial Android project you should do it manually.
For the latest build.gradle template for classic Android project check gh.c/N/n-1/b/m/o.n.e.e.g/docs/android/build.gradle.
You can continue to develop in Eclipse with ADT and run Gradle build using Nodeclipse/Enide Gradle for Eclipse
(marketplace)
Some screenshots for Gradle for Eclipse:

Categories

Resources