You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/09/04 00:30:58 UTC

[GitHub] [cordova-android] jomorr2 opened a new issue #1337: Android - Source and destination must not be the same.

jomorr2 opened a new issue #1337:
URL: https://github.com/apache/cordova-android/issues/1337


   # Bug Report
   
   ## Problem
   Running `cordova prepare` errors with returns "Source and destination must not be the same"
   
   I also get the error when running `cordorva build android` and `cordova platform add android`
   
   ### What is expected to happen?
   `cordova prepare` completes successfully and allows 
   
   
   ### What does actually happen?
   any cordova android command fails with the error message
   
   
   ## Information
   I did find this closed bug: https://github.com/apache/cordova-android/issues/693 and tried the suggestions, but that didn't fix my issue.
   
   Here is the output from `cordova prepare --verbose`
   No scripts found for hook "before_prepare".
   Checking for saved platforms that haven't been added to the project
   Platform API successfully found in: /Users/jonmorris/CordovaProjects/NWBBASchool/platforms/android/cordova/Api.js
   Checking for saved plugins that haven't been added to the project
   Generating platform-specific config.xml from defaults for android at /Users/jonmorris/CordovaProjects/NWBBASchool/platforms/android/app/src/main/res/xml/config.xml
   Merging project's config.xml into platform-specific android config.xml
   [Gradle Properties] Preparing Configuration
   [Gradle Properties] Appending default configuration properties
   [Gradle Properties] Updating Gradle property "android.useAndroidX" with the value of "false"
   [Gradle Properties] Updating Gradle property "android.enableJetifier" with the value of "false"
   [Gradle Properties] Appending custom configuration properties
   [Gradle Properties] Detected Gradle property "android.useAndroidX" with the value of "true", Cordova's recommended value is "false"
   [Gradle Properties] Detected Gradle property "android.enableJetifier" with the value of "true", Cordova's recommended value is "false"
   [Gradle Properties] Updating and Saving File
   Merging and updating files from [www, platforms/android/platform_www] to platforms/android/app/src/main/assets/www
     copy  www/platforms/ios/build/device/libCordova.a platforms/android/app/src/main/assets/www/platforms/ios/build/device/libCordova.a (updated file)
   Source and destination must not be the same.
   Error: Source and destination must not be the same.
       at Object.checkPathsSync (/Users/jonmorris/CordovaProjects/NWBBASchool/node_modules/fs-extra/lib/util/stat.js:51:11)
       at Object.copySync (/Users/jonmorris/CordovaProjects/NWBBASchool/node_modules/fs-extra/lib/copy-sync/copy-sync.js:24:38)
       at updatePathWithStats (/Users/jonmorris/CordovaProjects/NWBBASchool/node_modules/cordova-common/src/FileUpdater.js:106:12)
       at /Users/jonmorris/CordovaProjects/NWBBASchool/node_modules/cordova-common/src/FileUpdater.js:272:16
       at Array.map (<anonymous>)
       at Object.mergeAndUpdateDir (/Users/jonmorris/CordovaProjects/NWBBASchool/node_modules/cordova-common/src/FileUpdater.js:270:40)
       at updateWww (/Users/jonmorris/CordovaProjects/NWBBASchool/platforms/android/cordova/lib/prepare.js:186:17)
       at Api.module.exports.prepare (/Users/jonmorris/CordovaProjects/NWBBASchool/platforms/android/cordova/lib/prepare.js:85:28)
       at Api.prepare (/Users/jonmorris/CordovaProjects/NWBBASchool/platforms/android/cordova/Api.js:126:24)
       at /Users/jonmorris/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare/platforms.js:59:28
   
   
   ### Command or Code
   `cordova prepare`
   `cordova build android`
   `cordova cordova platform add android`
   
   
   ### Environment, Platform, Device
   cordova is installed on MacOS 11.3.1
   
   
   ### Version information
   `cordova info` output:
   Cordova Packages:
   
       cli: 10.0.0
           common: 4.0.2
           create: 3.0.0
           lib: 10.0.0
               common: 4.0.2
               fetch: 3.0.1
               serve: 4.0.0
   
   Project Installed Platforms:
   
       android: 9.1.0
   
   Project Installed Plugins:
   
       cordova-open-native-settings: 1.5.5
       cordova-plugin-androidx-adapter: 1.1.3
       cordova-plugin-canvas2image-updated: 1.2.0
       cordova-plugin-compat: 1.2.0
       cordova-plugin-customurlscheme: 5.0.2
       cordova-plugin-device: 2.0.3
       cordova-plugin-file: 6.0.2
       cordova-plugin-firebasex: 13.0.1
       cordova-plugin-inappbrowser: 5.0.0
       cordova-plugin-screen-orientation: 3.0.2
       cordova-plugin-splashscreen: 6.0.0
       cordova-plugin-statusbar: 2.4.3
       cordova-plugin-whitelist: 1.3.5
       cordova-plugin-wkwebview-file-xhr: 3.0.0
       es6-promise-plugin: 4.2.2
   
   Environment:
   
       OS: macOS 11.3.1 (20E241) (darwin 20.4.0) x64
       Node: v12.14.0
       npm: 6.13.4
   
   android Environment:
   
       android:
   ERROR: Command failed with ENOENT: android list target
   spawn android ENOENT
   
   
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] jomorr2 commented on issue #1337: Android - Source and destination must not be the same.

Posted by GitBox <gi...@apache.org>.
jomorr2 commented on issue #1337:
URL: https://github.com/apache/cordova-android/issues/1337#issuecomment-912986982


   Deleting and recreating the project, with the same versions of Cordova, platforms and plugins is able to build successfully now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek closed issue #1337: Android - Source and destination must not be the same.

Posted by GitBox <gi...@apache.org>.
breautek closed issue #1337:
URL: https://github.com/apache/cordova-android/issues/1337


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1337: Android - Source and destination must not be the same.

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1337:
URL: https://github.com/apache/cordova-android/issues/1337#issuecomment-912991076


   > Source and destination must not be the same
   
   This was a bug inside the fs-extra package if I recall correctly. If you had cordova / cordova-android installed before, it was possible it was installed at the time where the bugged version was the latest version.
   
   When recreating/reinstalling the project (presumeably wiping package-lock and node_modules), when reinstalling NPM will fetch the latest patch which contains the fix.
   
   Deleting node_modules & package-lock.json and then running `npm install` should yield the same results as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org