Question

I have a main Android project which references 4 other Android-Library projects in gradle. It compiles just fine and i can deploy it via gradle commandline, however I would like to debug my code using eclipse.

Whenever I load up the projects in Eclipse using the gradle integration plugin for Eclipse, eclipse won't even recognize them as library projects and instead treats them like normal android applications. Is this behavior normal or is something wrong with my gradle build script or does eclipse simply not support such a setup yet? Running/debugging the main application in eclipse just installs the individual libraries as regular applications which results in my main application not being able to find the specified classes.

My gradle build script is basically a c&p from Mike Gouline's sample project https://github.com/mgouline/android-samples with "apply: android" replaced with "apply: android-library" for my library projects.

Was it helpful?

Solution

Eclipse doesn't properly support Android Gradle projects. The Android plugin has a lot of specialized support for android-library modules that Eclipse's Gradle integration doesn't know about. For the time being, if you want full IDE support for Android/Gradle, Android Studio or IntelliJ with the Android plugin are your only choices.

We know the situation for people who are using the Gradle build system and want to use Eclipse isn't great; it's something we're thinking about, but we don't have anything definite on the roadmap yet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top