Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 926
Asaf Avatar asked Nov 11 '13 13:11

Asaf


People also ask

How do I convert a project to Gradle?

Import a Gradle-based IntelliJ project If you are already using Gradle with your IntelliJ project, you can open it in Android Studio using the following steps: Click File > New > Import Project. Select your IntelliJ project directory, and click OK. Your project will open in Android Studio.

How do I export a Gradle project?

Go to Build Settings and make sure Android is selected as the target platform and tick the Export Project checkbox, as shown below: You can now export your project using the Export button and choose a folder to export your project to.


1 Answers

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).

like image 184
CommonsWare Avatar answered Sep 28 '22 10:09

CommonsWare