Reputation: 10948
First, im new in gradle so please bear with me.
I successfully build and imported this project with gradle & eclipse on ubuntu 13.10. This is what i did :
gradle build
in terminal (success)apply plugin: 'eclipse'
in the build.gradle
gradle eclipse
in terminal (success)The problem is, when i tried to run the project, eclipse read it as "normal" java program, not the android one. This is the SS :
The main project in my workspace is not in eclipse format.
And this is its properties :
Notice there's no android
tab in it's properties. And i cant run it as android application
.
Am i missing something? Please kindly help me.
Thanks for your help.
Upvotes: 3
Views: 4526
Reputation: 64030
Usually to develop Android in Eclipse you need to install ADT into Eclipse or start with ADT-Bundle (Android IDE) from Google. (You have not as Preferences missing Android group)
However ADT does not have gradle support. And Android Studio is still not even yet beta (preview or alpha, bleeding edge, need to update with almost every build).
There is Nodeclipse/Enide Gradle for Eclipse (marketplace), that lets launch gradle build even on general project.
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.
This lets create new Android project in Eclipse with ADT and use ADT tools for most of things, but additionally have newer build with gradle and execute defined gradle tasks
But for Android project with several modules (as in this case) you would need to DIY do it yourself:
try to configure Eclipse .classpath
to correct values, as gradle eclipse
task won't yet do it all for you.
Upvotes: 2
Reputation: 4808
Eclipse plugin in Gradle that you have used does not support Android projects - they are significantly different from regular Java projects. Some things can work but there will be a lot of things missing including Android nature for generated projects.
And the ADT plugin provided by Google does not support Gradle projects yet as the team focuses on Android Studio first. http://tools.android.com/tech-docs/new-build-system can give you some ideas about the current state.
Upvotes: 1