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

AndroidStudio.js incorrectly decides project is Eclipse project

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • cordova-android-7.0.0
    • Master
    • cordova-android
    • None
    • Mac osx 10.13.2

    Description

      cordova add plugin fails on the error below, because it cannot find AndroidManifest.xml. I think the problem is caused by cordova/lib/AndroidStudio.js. It is using the presence of directories: libs and res to determine if a project is an Eclipse project. The problem is that one of the plugins I use does create these directories. So, any plugin added after the Eclipse created plugin causes this logic to think that all subsequent plugins are Eclipse plugins.

      cordova plugin add $HOME/ShortSands/BibleApp/Plugins/PKZip --nofetch
      Installing "com-shortsands-pkzip" for android
      Failed to install 'com-shortsands-pkzip': Error: ENOENT: no such file or directory, open '/Users/garygriswold/ShortSands/BibleApp/YourBible/platforms/android/AndroidManifest.xml'
      at Error (native)
      at Object.fs.openSync (fs.js:640:18)
      at Object.fs.readFileSync (fs.js:508:33)
      at Object.parseElementtreeSync (/Users/garygriswold/ShortSands/BibleApp/YourBible/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
      at new AndroidManifest (/Users/garygriswold/ShortSands/BibleApp/YourBible/platforms/android/cordova/lib/AndroidManifest.js:29:20)
      at AndroidProject.getPackageName (/Users/garygriswold/ShortSands/BibleApp/YourBible/platforms/android/cordova/lib/AndroidProject.js:99:12)
      at Api.addPlugin (/Users/garygriswold/ShortSands/BibleApp/YourBible/platforms/android/cordova/Api.js:223:57)
      at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
      at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
      at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
      Error: ENOENT: no such file or directory, open '/Users/garygriswold/ShortSands/BibleApp/YourBible/platforms/android/AndroidManifest.xml'

      Attachments

        1. AndroidStudio.js
          1 kB
          Gary N Griswold

        Activity

          People

            bowserj Joey Robert Bowser
            gary@shortsands.com Gary N Griswold
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: