Copying working project to USBb drive breaks the build

Due to the Androidsdk30 issue I was forced to hurriedly correct my app.
Anyway, I was able to build it successfully on my Drive c (W10)
I normally use a USB SSD drive to do the IOS build on the mac.

Copying the project folder to the USB drive results in all sorts of errors and I am really struggling to work out why this is occurring
for note W10 is NTFS usb is exFat. (I caught something in my googling it will break on fat32 but exFat is much newer

But I am not convinced the file system is the cause.
I would appreciate any input on this as it’s becoming a real pain

Ionic Info from working build
Ionic:

Ionic CLI : 6.12.2 (C:\Users\Evan\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 4.11.13
@angular-devkit/build-angular : 0.13.10
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.4.1

Cordova:

Cordova CLI : 10.0.0 (cordova-lib@10.1.0)
Cordova Platforms : android 9.1.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 14 other plugins)

Utility:

cordova-res (update available: 0.15.3) : 0.6.0
native-run (update available: 1.5.0) : 0.2.8

System:

NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10

Ionic infro from non-working one
Ionic:

Ionic CLI : 6.12.2 (C:\Users\Evan\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 4.11.13
@angular-devkit/build-angular : 0.13.10
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.4.1

Cordova:

Cordova CLI : 10.0.0 (cordova-lib@10.1.0)
Cordova Platforms : android 9.1.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 14 other plugins)

Utility:

cordova-res (update available: 0.15.3) : 0.6.0
native-run (update available: 1.5.0) : 0.2.8

System:

NodeJS : v10.16.0 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10

Just out of curiosity. Are you copying also node_modules and other generated folders?

node_modules should be recreated based on the OS you are using as they may include os specific binaries (I believe node-gyp or so?) - npm i. Other generated folders such as build files and maybe even cordova add platform stuff might yield errors

Hi Thanks for the reply.
The whole folder is being copied as both are on the same PC I don’t expect to have any issues but I do.
Any suggestions on where I can look?
I will update with additional information and I am rolling back and trying to capture the reported errors and my attempts at resolving them.

Ok first attempt was to remove android
resulting in the following
cordova platform rm android
(node:2936) ExperimentalWarning: The fs.promises API is experimental
Removing platform android from config.xml file…
Removing android from cordova.platforms array in package.json
npm: Command failed with exit code 4294963228 Error output:
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN @ionic-native/app-version@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/camera@5.34.0 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/core@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/device@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/diagnostic@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/fabric@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/fcm@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/file@5.34.0 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/file-path@5.34.0 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/geolocation@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/in-app-browser@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/ionic-webview@5.34.0 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is
installed. You must install peer dependencies yourself.
npm WARN @ionic-native/network@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/open-native-settings@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/splash-screen@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is
installed. You must install peer dependencies yourself.
npm WARN @ionic-native/status-bar@5.31.1 requires a peer of rxjs@^5.5.0 || ^6.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.

npm ERR! path E:\MobileApp\v1909C\resources\plugins\cordova-fabric-plugin
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall symlink
npm ERR! EISDIR: illegal operation on a directory, symlink ‘E:\MobileApp\v1909C\resources\plugins\cordova-fabric-plugin’ → ‘E:\MobileApp\v1909C\node_modules\cordova-fabric-plugin’

This is your problem. ExFAT doesn’t support symbolic links.

Hi Robert
I appreciate your reply
The mystery then becomes why did my previous version targetsdk 29 worked and build flawlessly on the same drive (exfat)
I am trying a diffeent tack now.
I’ve stripped the project folder down to the essentials
(duplicated) on my Drive C
After changing the targetsdk to 30 and updating to cordova 9.1.0
I simply ran ionic cordova build android (on drive C) and it built flawlessly.
copying to folder to the USB drive and simply trying to build the first error I get is
Task :app:checkDebugDuplicateClasses FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:checkDebugDuplicateClasses’.

1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class io.liteglue.SQLCode found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLColumnType found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLDatabaseHandle found in modules sqlite-native-ndk-connector.jar
(sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLGDatabaseHandle found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLGDatabaseHandle$1 found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLGDatabaseHandle$SQLGStatementHandle found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLStatementHandle found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteConnection found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteConnectionFactory found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteConnector found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteGlueConnection found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteGlueConnection$SQLGStatement found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteNDKNativeDriver found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteNativeResponse found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteOpenFlags found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)
Duplicate class io.liteglue.SQLiteStatement found in modules sqlite-native-ndk-connector.jar (sqlite-native-ndk-connector.jar) and sqlite-native-ndk-connector.jar (sqlite-ndk-native-driver.jar)

Go to the documentation to learn how to Fix dependency resolution errors.

I know I can overcome this error by changing the follooiwing
org.gradle.daemon=true

org.gradle.jvmargs=-Xmx2048m

android.useAndroidX=false ← true

android.enableJetifier=false ← true

cdvMinSdkVersion=19

cdvTargetSdkVersion=30

But my first question is why does it only object on the copied folder and not on the one in my drive C

Further to my litle saga.
I reformatted the USB to ntfs put my projects back and it built with the same working copy on my drive C
I will verify the ability to publish etc but its way more than I had since updating to later versions of cordova and gradle.

It appears the USB was the issue.
I have another problem related to my rebuild but I will raise a new topic
Thanks for your help everyone.

1 Like