title: Ionic Failed - Android Build
body: <p>This is the output I get</p>
  
  <pre><code>ionic cordova build android  --stacktrace
  &gt; cordova build android
  ✖ Running command - failed!
  
  [ERROR] Cordova encountered an error.
          You may get more insight by running the Cordova command above directly.
  
  [ERROR] An error occurred while running cordova build android (exit code 1):
  
          (truncated) ... ld UP-TO-DATE
          :CordovaLib:compileReleaseNdk UP-TO-DATE
          :CordovaLib:copyReleaseLint UP-TO-DATE
          :CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
          :CordovaLib:packageReleaseRenderscript UP-TO-DATE
          :CordovaLib:checkReleaseManifest
          :CordovaLib:prepareReleaseDependencies
          :CordovaLib:compileReleaseRenderscript UP-TO-DATE
          :CordovaLib:generateReleaseResValues UP-TO-DATE
          :CordovaLib:generateReleaseResources UP-TO-DATE
          :CordovaLib:packageReleaseResources UP-TO-DATE
          :CordovaLib:compileReleaseAidl UP-TO-DATE
          :CordovaLib:generateReleaseBuildConfig UP-TO-DATE
          :CordovaLib:mergeReleaseShaders UP-TO-DATE
          :CordovaLib:compileReleaseShaders UP-TO-DATE
          :CordovaLib:generateReleaseAssets UP-TO-DATE
          :CordovaLib:mergeReleaseAssets UP-TO-DATE
          :CordovaLib:processReleaseManifest UP-TO-DATE
          :CordovaLib:processReleaseResources UP-TO-DATE
          :CordovaLib:generateReleaseSources UP-TO-DATE
          :CordovaLib:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
          :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
          :CordovaLib:processReleaseJavaRes UP-TO-DATE
          :CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
          :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
          :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
          :CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
          :CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
          :CordovaLib:bundleRelease UP-TO-DATE
          :prepareComAndroidSupportSupportCompat2600Alpha1Library UP-TO-DATE
          :prepareComAndroidSupportSupportCoreUi2600Alpha1Library UP-TO-DATE
          :prepareComAndroidSupportSupportCoreUtils2600Alpha1Library UP-TO-DATE
          :prepareComAndroidSupportSupportFragment2600Alpha1Library UP-TO-DATE
          :prepareComAndroidSupportSupportMediaCompat2600Alpha1Library UP-TO-DATE
          :prepareComAndroidSupportSupportV42600Alpha1Library UP-TO-DATE
          :prepareComGoogleAndroidGmsPlayServicesAds1026Library UP-TO-DATE
          :prepareComGoogleAndroidGmsPlayServicesAdsLite1026Library UP-TO-DATE
          :prepareComGoogleAndroidGmsPlayServicesBase1026Library UP-TO-DATE
          :prepareComGoogleAndroidGmsPlayServicesBasement1026Library UP-TO-DATE
          :prepareComGoogleAndroidGmsPlayServicesClearcut1026Library UP-TO-DATE
          :prepareComGoogleAndroidGmsPlayServicesGass1026Library UP-TO-DATE
          :prepareComGoogleAndroidGmsPlayServicesTasks1026Library UP-TO-DATE
          :prepareOrgXwalkXwalk_core_library22525614Library UP-TO-DATE
          :prepareArmv7DebugDependencies
          :compileArmv7DebugAidl UP-TO-DATE
          :compileArmv7DebugRenderscript
          :generateArmv7DebugBuildConfig UP-TO-DATE
          :mergeArmv7DebugShaders UP-TO-DATE
          :compileArmv7DebugShaders UP-TO-DATE
          :generateArmv7DebugAssets UP-TO-DATE
          :mergeArmv7DebugAssets UP-TO-DATE
          :createXwalkCommandLineFileArmv7Debug
          :generateArmv7DebugResValues UP-TO-DATE
          :generateArmv7DebugResources
          :mergeArmv7DebugResources
          :processArmv7DebugManifest
          :processArmv7DebugResources
          :generateArmv7DebugSources
          :incrementalArmv7DebugJavaCompilationSafeguard UP-TO-DATE
          :compileArmv7DebugJavaWithJavac UP-TO-DATE
          :compileArmv7DebugNdk UP-TO-DATE
          :compileArmv7DebugSources UP-TO-DATE
          :prePackageMarkerForArmv7Debug
          :transformClassesWithDexForArmv7Debug UP-TO-DATE
          :mergeArmv7DebugJniLibFolders UP-TO-DATE
          :transformNative_libsWithMergeJniLibsForArmv7Debug UP-TO-DATE
          :processArmv7DebugJavaRes UP-TO-DATE
          :transformResourcesWithMergeJavaResForArmv7Debug FAILED
  
  
          BUILD FAILED
  
          Total time: 40.152 secs
          FAILURE: Build failed with an exception.
  
          * What went wrong:
          Execution failed for task ':transformResourcesWithMergeJavaResForArmv7Debug'.
          &gt; com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.squareup.okhttp3/okhttp/pom.properties
                  File1: C:\Users\A2\.gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\okhttp\3.8.0\5a11f020cce2d11eb71ba916700600e18c4547e7\okhttp-3.8.0.jar
                  File2: C:\Users\A2\Desktop\posApAp\posApp\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-basement\10.2.6\jars\classes.jar
  
  
          * Try:
          Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
          Error: cmd: Command failed with exit code 1 Error output:
          FAILURE: Build failed with an exception.
  
          * What went wrong:
          Execution failed for task ':transformResourcesWithMergeJavaResForArmv7Debug'.
          &gt; com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.squareup.okhttp3/okhttp/pom.properties
                  File1: C:\Users\A2\.gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\okhttp\3.8.0\5a11f020cce2d11eb71ba916700600e18c4547e7\okhttp-3.8.0.jar
                  File2: C:\Users\A2\Desktop\posApAp\posApp\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-basement\10.2.6\jars\classes.jar
  
  
          * Try:
          Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  </code></pre>
  
  <p>Can somebody please let me know how to sort this issue? Thank you. 
  It says Duplicate class copied. How to solve this issue. I tried exclude in build.gradle but it's not helping.</p>