0

It's my code sample. When I firstly build my code, it results in so-called dex error. I added multiDexEnabled property to my gradle setting, but it results in java heap memory overflow. I increased its max size, and finally got builded. However, another error occurred...... what is the problem? android adk version?

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.2"

    defaultConfig {
        applicationId "belobster.earthquakealert"
        minSdkVersion 14
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dexOptions {
        javaMaxHeapSize "2g"
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.google.android.gms:play-services:9.6.1'
}

emulator image.

genymotion emulator displaying google maps error

  • 1
    Check this out, you might get your answer http://stackoverflow.com/questions/31890714/my-application-relies-google-play-services-which-is-not-supported-by-your-devic – Mr. J Oct 21 '16 at 11:16

3 Answers3

1

Check whether play services is available on the emulator, you should consider using physical device for these kind of testing purposes since maps require location services quite often.

Manoj Perumarath
  • 9,337
  • 8
  • 56
  • 77
1

download gapps-lp-20141109-signed and install in genymotion

Hemant Ukey
  • 328
  • 4
  • 15
0

If you want to test it into Genymotion only then , Genymotion provide support for play service

So please check it. It's work for me. Thank you.