Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-14130

Need to run prepare twice to restore plugins

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.0.0
    • Fix Version/s: None
    • Component/s: cordova-lib
    • Labels:
      None
    • Environment:

      Ubuntu 18.04
      Cordova 8.0.0

      Description

       Run this code in your shell

      cordova create example && cd example
      cordova platform add android
      rm -r plugins/ platforms/
      cordova prepare

      Expected

      Plugins and Platforms restored

      Actual

      platform is restored, plugin-whitelist not:

      Discovered platform "android@^7.0.0" in config.xml or package.json. Adding it to the project
      Using cordova-fetch for cordova-android@^7.0.0
      Adding android project...
      Creating Cordova project for the Android platform:
      Path: platforms/android
      Package: io.cordova.hellocordova
      Name: HelloCordova
      Activity: MainActivity
      Android target: android-27
      Subproject Path: CordovaLib
      Subproject Path: app
      Android project created with cordova-android@7.1.0
      Android Studio project detected
      Android Studio project detected
      Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
      Failed to restore plugin "cordova-plugin-whitelist" from config.xml. You might need to try adding it again. Error: Cannot find plugin.xml for plugin "cordova-android". Please try adding it again.

      Another cordova prepare restores the plugin:

      Android Studio project detected
      Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
      Installing "cordova-plugin-whitelist" for android
      
      This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
      

       

        Attachments

          Activity

            People

            • Assignee:
              raphinesse Raphael von der Grün
              Reporter:
              raphinesse Raphael von der Grün
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: