1

My code was working fine and build app fine and then i suddenly get an error after updating below given libraries from Android SDK Manager

Extra > Google Play Services

Extra > Google Repository

I have implemented both cordova plugin googlefit and plugin cordova plugin healthkit

Dependencies into build.gradle file

dependencies {

    compile fileTree(dir: 'libs', include: '*.jar')

    debugCompile project(path: "CordovaLib", configuration: "debug")

    releaseCompile project(path: "CordovaLib", configuration: "release")

    compile "com.google.android.gms:play-services-fitness:9.4.0"

    compile "com.google.android.gms:play-services:7.5.0+"

}

I already tried android platform remove and add it again

I cannot able to build app using this command

ionic build android

enter image description here

LOVE
  • 112
  • 8
  • this happen when you include too much methods in a android project. You can add `multiDexEnabled:true` to your build.gradle but isn't the best solution. You should remove `play-services:7.5.0+` and add only what you need (for example: `play-services-fitness`) – gianlucatursi Sep 06 '16 at 13:03
  • can you try this solution http://stackoverflow.com/questions/26342444/multiple-dex-files-define-landroid-support-annotation-animres/35146779#35146779 – Raj Nandan Sharma Sep 07 '16 at 04:52

1 Answers1

0

Add this in you app build.gradle defaultConfig section

multiDexEnabled true
Arslan
  • 249
  • 2
  • 13