Plugins not getting installed during ionic platform add

#1

Hi, i’ve been dealing with a problem that it’s killing me right know(i have to finish a final project very soon)

So, everytime i run ionic cordova platform add android, most of my plugins dont get installed, the same happens with ionic cordova run android. I’ve tried to remove android platform and then add it again, but still the same. I even uninstall all the plugins and then add it again, still the same, i tried with another project to see what is happening, and they work well.

this is what I get while running ionic cordova platform add android:

Using cordova-fetch for cordova-android@~7.0.0

Adding android project…

Creating Cordova project for the Android platform:

    Path: platforms\android
    Package: io.ionic.starter

    Name: Enjoy_Shopping
    Activity: MainActivity
    Android target: android-26

Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@7.0.0

Android Studio project detected

Android Studio project detected

Installing “cordova-plugin-advanced-http” for android

Installing “cordova-plugin-file” for android

The Android Persistent storage location now defaults to “Internal”. Please check this plugin’s README to see if your application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an “AndroidPersistentFileLocation” you may need to add:

  "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files.

Subproject Path: CordovaLib
Subproject Path: app
Installing “cordova-plugin-device” for android

Installing “cordova-plugin-http” for android

Plugin dependency “cordova-plugin-file@6.0.1” already fetched, using that version.

Dependent plugin “cordova-plugin-file” already installed on android.

Error during processing of action! Attempting to revert…

Failed to install ‘cordova-plugin-http’: CordovaError: Uh oh!
“C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\app\src\main\java\com\github\kevinsawicki\http\HttpRequest.java” already exists!
at copyNewFile (C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\lib\pluginHandlers.js:261:45) at install (C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\lib\pluginHandlers.js:51:17)
at ActionStack.process (C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\node_modules\cordova-common\src\ActionStack.js:56:25)
at PluginManager.doOperation (C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:114:20)
at PluginManager.addPlugin (C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:144:17)
at C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\Api.js:247:74
at _fulfilled (C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\node_modules\q\q.js:854:54)
at self.promiseDispatch.done (C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch (C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\node_modules\q\q.js:816:13)
at C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\cordova\node_modules\q\q.js:570:49

(node:314596) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Uh oh!
“C:\Users\JulioD07\Desktop\TESIS\tesisFrontend\platforms\android\app\src\main\java\com\github\kevinsawicki\http\HttpRequest.java” already exists!
(node:314596) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

ionic cordova resources android --force
√ Collecting resource configuration and source images - done!
√ Filtering out image resources that do not need regeneration - done!
√ Uploading source images to prepare for transformations - done!
√ Generating platform resources: 18 / 18 complete - done!
√ Modifying config.xml to add new image resources - done!

not all the plugins get installed, i mean, they dont even appear in the console(whitelist is one of then and it did not show up, and a couple more).

Here’s the list of plugins:

ejemplo11

and here is what the android.json has:

{
“prepare_queue”: {
“installed”: ,
“uninstalled”:
},
“config_munge”: {
“files”: {}
},
“installed_plugins”: {
“cordova-plugin-advanced-http”: {
“PACKAGE_NAME”: “io.ionic.starter”
},
“cordova-plugin-device”: {
“PACKAGE_NAME”: “io.ionic.starter”
}
},
“dependent_plugins”: {
“cordova-plugin-file”: {
“PACKAGE_NAME”: “io.ionic.starter”
}
}
}

This is what the fetch.json has:

{
“cordova-plugin-device”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-device@2.0.2”
},
“is_top_level”: true,
“variables”: {}
},
“cordova-plugin-file”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-file@>=2.0.0”
},
“is_top_level”: false,
“variables”: {}
},
“cordova-plugin-advanced-http”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-advanced-http”
},
“is_top_level”: true,
“variables”: {}
},
“cordova-plugin-http”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-http”
},
“is_top_level”: true,
“variables”: {}
},
“cordova-plugin-ionic-keyboard”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-ionic-keyboard”
},
“is_top_level”: true,
“variables”: {}
},
“cordova-plugin-ionic-webview”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-ionic-webview@2.0.2”
},
“is_top_level”: true,
“variables”: {}
},
“cordova-plugin-network-information”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-network-information”
},
“is_top_level”: true,
“variables”: {}
},
“cordova-plugin-splashscreen”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-splashscreen@5.0.2”
},
“is_top_level”: true,
“variables”: {}
},
“cordova-plugin-whitelist”: {
“source”: {
“type”: “registry”,
“id”: “cordova-plugin-whitelist@1.3.3”
},
“is_top_level”: true,
“variables”: {}
},
“cordova-sqlite-storage”: {
“source”: {
“type”: “registry”,
“id”: “cordova-sqlite-storage”
},
“is_top_level”: true,
“variables”: {}
}
}

This is the ionic info:

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.4
    npm               : 5.6.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\JulioD07\Desktop\sdk

Misc:

    backend : pro

More info:

When i check the platform project on android studio, i only see three plugins added, the others aren’t there. Something which doesnt happend with other projects.

Sorry for any post mistake that i make, it’s my first post here.

#2

Solved by just running ionic cordova platform add android@6.4.0
It seems that 7.0.0 has some problems.