Exporting an eclipse project as gradle - android

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:

Related

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.

Migrating from eclipse ADT to Android Studio

I have Updated my sdk and all things gone wrong
my Appcompat v7 and play services libraries are giving errors without any reason.
I cannot build my project to gradle
is there any easiest way to move my project to android studio without gradle project?
I dont think you need to worry about gradle.
Install any extra libs, sdks that you want.
Download/install AS 1.0.1 to somewhere in fileSys where you have RW privledges, and then get used to AS by just clone a git project like this
go to AS and follow "import non AS project" giving the folder of where you cloned the git proj.
Gradle builds on this cloned and imported project should just work ..... no gradle knowledge reqd.
then go back to your Appcompat V7 guy with the issues and try to import it as non AS .. the IDE will make a copy of the orig proj. and it should sync and build OK. Gradle wrapper stuff will be handled as part of the import process so you dont have to immediately know all kinds of gradle build trivia.
In long run , if u do android , you're going to need to pick up gradle. this

ADT Eclipse + gradle + dependencies

Has anyone managed to make adt + gradle work together on his android apps? I wrote my build.gradle file using gradle plugin by spring and it builds just fine. However the adt thinks that there are no local libs attached to the project (appcompat) so it hits error at my resource files.
So my question is how to fully intergrade a gradle build with adt? Or should I ask how to fool eclipse ADT into thinking that all local libs are there without actually adding the lib projects to workspace?
I don't wanna use Intellij or Android Studio. I tried them but they are confusing and complicated to me. I wanna use eclipse for everything.
OK Eclipse dudes just told me that this will be available soon via a project called Andmore. they will handle and continue the developing of adt now that google has dropped support on it.
This is still a work in progress but they expect to start bootstrapping the project soon.

Eclipse Gradle export of Android project does nothing

I'm trying to export my Android project from Eclipse (ADT 22.2.1) using the Gradle plugin.
I select my project in the initial Gradle dialog, click next
My project appears along with Android dependencies.
When I click on Finish, I can barely see a message "Creating Gradle Build files" BUT I never get a confirmation of Success. And build.gradle or settings.gradle ARE NOT in my projects root directory.
I can select each of the dependency libraries and they complete successfully
Any suggestions?
jb
I faced the same problem, my solution was install the lastest Eclipse from their page, (i was using Juno, now with Kepler didn't have that problem), and Android ADT plugin link. Seems that they have breaked compatibility with older eclipse version in newer ADTs
An ankward one, but...at least it works
You can try it "the hard way", creating required files (build.gradle, gradle wrapper et al) by hand, but you will got a lot of mistakes, didn't worth the time spent.
EDIT : Extracted from Android Tools Tech Docs : Open the project in Eclipse, and from there, export the project. NOTE: Make sure you are using the latest possible version of Eclipse since we have fixed issues related to export recently.

Android ActionBarSherlock on NetBeans - working but editor showing errors

I'm using NetBeans for android application. I installed properly (I think) ActionBarSherlock package as android library project. Everything works fine, I can build and run application, but code editor doesn't recognize ABS classes (just look at screenshot, BUILD SUCCESSFUL but errors exists) and code completion doesn't work too.
My configuration:
Stable NetBeans 7.2 with android plugin ver. 1.13
Linux Mint 13 Maya 64 bit, Mate
ActionBarSherlock ver 4.2 (stable)
How I installed ABS:
Download and extract source
From sdk/tools run command:
./android update project -p path_to_ActionBarSherlock/library/
Similar command to connect android project library with my test project (there is similar option in Netbeans IDE but I get error that this is not android library project)
./android update project -l path_to_ActionBarSherlock/library/ -p path_to_my_test_project
I have tried clean and build on both projects but no results. Any idea?
Regards
The way I finally managed to add ActionBarSherlock to my android project on Netbeans was to:
Download the latest version of ActionBarSherlock and unzip it
Go to the subfolder called library and remove the pom.xml file from there (with one of the previous versions it didn't work. I had to first build it, close it and remove not only pom.xml but also some netbeans properties files)
Open that subproject (library) in the Netbeans
Now this project will no longer be seen as a maven project. Netbeans will see it as an Android project. Then I:
Clean&build it
Add it to my-project's library properties (right-click on my-project, properties, library, add, point the proper location of library project). Important here was to copy/move that library project somewhere near my-project. Otherwise it claimed that it cannot open it.
And from now on it works fine.
Key to that thinking was that Netbeans didn't want to add the provided library project cause it saw it as a Maven project. When the pom is deleted, Netbeans no longer sees it as Maven project nut as an Android project and it can without any objections add it as an Android's project library.
Probably there are better solutions, but I didn't find any and that was the only one working for me.
Hope it helps.
You can also make a new Android project, and then copy and paste the needed files in the new project.
So only copy:
libs, res, src, AndroidManifest.xml

Categories

Resources