1

According to the step-by-step guide from https://developer.glympse.com/sdk/android, Glympse SDK uses Eclipse, but Android Studio is now the suggested IDE.

Can I use Android Studio for Glympse SDK? Was there any known issue for using Android Studio with Glympse SDK?

Efreeto
  • 2,132
  • 1
  • 24
  • 25

1 Answers1

1

We're working on this for future releases. For now you can:

  1. Copy the code below into GlympseApiLite/build.gradle
  2. Add the following two lines to your main settings.gradle file and update the second line with the location of the GlympseApiLite directory
    • include ':GlympseApiLite'
    • project(':GlympseApiLite').projectDir = new File('../GlympseApiLite')

Enjoy Android Studio!


    apply plugin: 'android-library'
    android {
        compileSdkVersion 21
        buildToolsVersion '20'

        defaultConfig {
            minSdkVersion 5
            targetSdkVersion 21
        }

        sourceSets {
            main {
                manifest.srcFile 'AndroidManifest.xml'
                java.srcDirs = ['src']
                res.srcDirs = ['res']
                assets.srcDirs = ['assets']
            }
        }
    }
    dependencies {
        compile 'com.android.support:support-v4:21.+'
        compile fileTree(dir: 'libs', include: ['Glympse*.jar'])
    }

Rasekh
  • 26
  • 2
  • Thanks Rasekh. But I don't see the build.gradle and settings.gradle file in the folders. Should I export it from Eclipse first? (like http://tools.android.com/tech-docs/new-build-system/migrating-from-eclipse-projects) – Efreeto Feb 19 '15 at 18:16
  • 1
    There should be a settings.gradle file that already exists for your application. It will be located in the top level of your gradle project's folder. A new build.gradle file can be created, and its entire contents can be what Rasekh has posted above. – Nick Glickenhouse Feb 19 '15 at 18:53