0

Getting bellow Error while generating signed APK for android wear.

Error:Execution failed for task ':wear:transformClassesWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

Although when I'm debugging, its running flawlessly in device or emulator. But the above issue occurs every time I try to generate the signed APK for Android-Wear.

Shekh Shagar
  • 1,305
  • 1
  • 11
  • 22

1 Answers1

0

The way I solved the issue I edited build.gradle file of both mobile and wear module. add " multiDexEnabled true " inside of defaultConfig{} of "build.gradle" file of both mobile and wear module. samples are bellow.

android {
    defaultConfig {
       ....
             multiDexEnabled true
        ...  
    }
}
Shekh Shagar
  • 1,305
  • 1
  • 11
  • 22