0

Android Studio is still in preview, however many projects are already using Gradle build system which is integrated into Android Studio.

Being an early access preview however, migrating a whole project to Android Studio is too risky, and migration seems to be a one way process.

Is there a way for a single Android project to work seamlessly in both environments (IDEs: Eclipse, Android Studio; and build systems: Ant, Gradle)?

Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
Hassan Ibraheem
  • 2,329
  • 1
  • 17
  • 23

1 Answers1

3

You could set your build.gradle in android studio like this:

android {
    compileSdkVersion 18
    buildToolsVersion "18.1.1"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        instrumentTest.setRoot('tests')
    }
}

But I suggest to use Android Studio. I use it from 0.3.6 and I find it easier to use than Eclipse. I've made Apps with native lib, modules and the only problem I've found was that strings.xml was reformatted after create a new Activity.

twlkyao
  • 14,302
  • 7
  • 27
  • 44
Manuel Spigolon
  • 11,003
  • 5
  • 50
  • 73