Problem when i build cordova android


#1

Hi every one ,please… I have an error when i run cordova build android.
i think that was happen after add some plugins.Thanks :grinning:

  1. Error Here.
* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v13/view/DragAndDropPermissionsCompat.class

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  1. my info:

cli packages: (C:\Users\Ahmadklsany\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 26.1.1
Node              : v8.1.3
npm               : 5.0.3
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\Ahmadklsany\AppData\Local\Android\sdk

Misc:

backend : pro

#2

That can not really be true. What does ionic cordova platform list return?

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here: https://ionic.zone/cordova/update


#3

Sorry
cli packages: (C:\Users\Ahmadklsany\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : not installed

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 26.1.1
Node              : v8.1.3
npm               : 5.0.3
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\Ahmadklsany\AppData\Local\Android\sdk

Misc:

backend : pro

#4

Installed platforms:
android 6.3.0
Available platforms:
blackberry10 ~3.8.0 (deprecated)
browser ~5.0.0
ios ~4.5.1
osx ~4.0.1
ubuntu ~4.3.4 (deprecated)
webos ~3.7.0
windows ~5.0.0
www ^3.12.0


#5

You have to install the most recent Cordova CLI (which is 8.0.0) and then install the most recent Cordova-Android (which is 7.1.0) to make sure you have a current setup.


#6

i run npm update -g cordova but it not still 7.1.0


#7
C:\Projects                     
λ npm info cordova version      
8.0.0                           
                                
C:\Projects                     
λ cordova -v                    
8.0.0                           

First command shows what is available online on npm, second one what is installed locally on my machine.


#8

%D8%B4%D8%B4%D8%B4


#9

Run npm update -g cordova again and post its complete output please.


#10

no any output !!
asd


#11

And npm list -g --depth=0?


#12

±- @angular/cli@1.2.6
±- cordova@7.1.0
±- ionic@3.19.0
`-- reload@2.0.0


#13

Well, let’s be more drastic then:

npm uninstall -g cordova
npm install -g cordova@8.0.0
cordova -v

This should make sure that 8.0.0 is installed.


#14

i have find the solution to my problem ,thank alot to your time