Is it possible to use Android Studio AND Eclipse in a team

android-gradle-plugin, android-studio, eclipse, jar

Solution

You'll need to set up a Gradle build file for use by Android Studio, and maintain the Eclipse project files separately; there will be no automated way of keeping the two synchronized.

Gradle-based projects like to have a different directory structure than old-style Eclipse projects; you'll need to adapt the Gradle project to use Eclipse-style directories.

There's some advice on how to do that at Maintaining directory structure during Android Studio import but the basic idea is to set up your build file like this:

android {
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
}

Problem

Android Studio re-arranges the structure of projects imported from eclipse. I have just joined a team which is using Eclipse but I would like to use Android Studio and impact their current work practices as little as possible. Is there anyway it is possible for a team to use the 2 IDEs and share the same repo?

Original source

Related problems