NativeScript / nativescript-angular

Integrating NativeScript with Angular
http://docs.nativescript.org/angular/tutorial/ng-chapter-0
Apache License 2.0
1.21k stars 240 forks source link

Unable to apply changes on device: Error is: cp: cannot create directory '/platforms/android/app/src': No such file or directory #1577

Closed tsonevn closed 5 years ago

tsonevn commented 5 years ago

@gavande commented on Tue Oct 30 2018

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  "nativescript": {
    "id": "org.nativescript.cloint",
    "tns-ios": {
      "version": "4.2.0"
    },
    "tns-android": {
      "version": "4.2.0"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "scripts": {
    "lint": "tslint \"src/**/*.ts\""
  },
  "dependencies": {
    "@angular/animations": "~6.1.0",
    "@angular/common": "~6.1.0",
    "@angular/compiler": "~6.1.0",
    "@angular/core": "~6.1.0",
    "@angular/forms": "~6.1.0",
    "@angular/http": "~6.1.0",
    "@angular/platform-browser": "~6.1.0",
    "@angular/platform-browser-dynamic": "~6.1.0",
    "@angular/router": "~6.1.0",
    "nativescript-angular": "~6.1.0",
    "nativescript-camera": "^4.0.3",
    "nativescript-iqkeyboardmanager": "^1.3.0",
    "nativescript-permissions": "^1.2.3",
    "nativescript-secure-storage": "^2.3.0",
    "nativescript-snackbar": "^3.2.0",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-sidedrawer": "~4.3.0",
    "nativescript-web-image-cache": "^4.2.6",
    "reflect-metadata": "~0.1.10",
    "rxjs": "~6.2.0",
    "tns-core-modules": "~4.2.0",
    "tns-platform-declarations": "^4.2.1",
    "zone.js": "~0.8.18"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~6.1.0",
    "@nativescript/schematics": "~0.3.0",
    "@ngtools/webpack": "~6.2.0",
    "codelyzer": "~4.3.0",
    "nativescript-dev-sass": "~1.6.0",
    "nativescript-dev-typescript": "~0.7.0",
    "nativescript-dev-webpack": "^0.16.0",
    "tslint": "~5.11.0",
    "typescript": "~2.7.2"
  },
  "readme": "NativeScript Application"
}

Describe the bug tns run android --bundle is giving me following error:

Unable to apply changes on device:*. Error is: cp: cannot create directory '/platforms/android/app/src': No such file or directory.

If I delete platforms folder and then run above command then it does not give any error. But once I stop the command and rerun same command gives above error.

Same issue is with iOS platform.

I have deleted node_modules, hooks, platforms folders and then tried to run but same issue.

I have tried upgrade webpack to the latest version but It also didn't work.

Additional context

Here is console after running command:

~/Projects/production/cloint [requests] $ tns run android --bundle
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Starting Android emulator with image Nexus_5X_API_25
Waiting for emulator device initialization...
Executing before-liveSync hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-liveSync/nativescript-angular-sync.js
Executing before-watchPatterns hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-watchPatterns/nativescript-dev-sass.js
Executing before-watchPatterns hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-watchPatterns/nativescript-dev-typescript.js
Executing before-watchPatterns hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-watchPatterns/nativescript-dev-webpack.js
Executing before-watch hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-watch/nativescript-dev-sass.js
Hook skipped because bundling is in progress.
Executing before-watch hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-watch/nativescript-dev-typescript.js
Hook skipped because bundling is in progress.
Executing before-watch hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-watch/nativescript-dev-webpack.js
Running webpack for Android...
clean-webpack-plugin: /Users/rahulgavande/Projects/production/cloint/platforms/android/app/src/main/assets/app/**/* has been removed.
File change detected. Starting incremental webpack compilation...

Webpack is watching the files…

Hash: 68c900ccb3e606cb9949
Version: webpack 4.6.0
Time: 24946ms
Built at: 2018-10-30 11:47:05
                                                                               Asset        Size  Chunks             Chunk Names
  App_Resources/Android/src/main/res/drawable-xhdpi/baseline_arrow_back_white_18.png   171 bytes          [emitted]
                                                                           bundle.js    62.1 KiB  bundle  [emitted]  bundle
                                                                                1.js    6.48 KiB       1  [emitted]
                                                                                2.js    69.6 KiB       2  [emitted]
                                                                           vendor.js    5.05 MiB  vendor  [emitted]  vendor
                                                    App_Resources/Android/app.gradle   549 bytes          [emitted]
                                                 App_Resources/Android/src/.DS_Store       6 KiB          [emitted]
                                  App_Resources/Android/src/main/AndroidManifest.xml    1.36 KiB          [emitted]
                     App_Resources/Android/src/main/res/drawable-hdpi/background.png    3.42 KiB          [emitted]
          App_Resources/Android/src/main/res/drawable-hdpi/baseline_add_white_18.png   150 bytes          [emitted]
          App_Resources/Android/src/main/res/drawable-hdpi/baseline_add_white_24.png   138 bytes          [emitted]
          App_Resources/Android/src/main/res/drawable-hdpi/baseline_add_white_36.png   158 bytes          [emitted]
          App_Resources/Android/src/main/res/drawable-hdpi/baseline_add_white_48.png    97 bytes          [emitted]
   App_Resources/Android/src/main/res/drawable-hdpi/baseline_arrow_back_white_18.png   160 bytes          [emitted]
   App_Resources/Android/src/main/res/drawable-hdpi/baseline_arrow_back_white_24.png   171 bytes          [emitted]
   App_Resources/Android/src/main/res/drawable-hdpi/baseline_arrow_back_white_36.png   176 bytes          [emitted]
   App_Resources/Android/src/main/res/drawable-hdpi/baseline_arrow_back_white_48.png   203 bytes          [emitted]
                           App_Resources/Android/src/main/res/drawable-hdpi/icon.png     6.8 KiB          [emitted]
                           App_Resources/Android/src/main/res/drawable-hdpi/logo.png    32.4 KiB          [emitted]
                           App_Resources/Android/src/main/res/drawable-hdpi/menu.png   291 bytes          [emitted]
                     App_Resources/Android/src/main/res/drawable-ldpi/background.png    1.31 KiB          [emitted]
                           App_Resources/Android/src/main/res/drawable-ldpi/icon.png    3.23 KiB          [emitted]
                           App_Resources/Android/src/main/res/drawable-ldpi/logo.png    9.95 KiB          [emitted]
                           App_Resources/Android/src/main/res/drawable-ldpi/menu.png   213 bytes          [emitted]
                     App_Resources/Android/src/main/res/drawable-mdpi/background.png    1.89 KiB          [emitted]
          App_Resources/Android/src/main/res/drawable-mdpi/baseline_add_white_18.png   102 bytes          [emitted]
          App_Resources/Android/src/main/res/drawable-mdpi/baseline_add_white_24.png    92 bytes          [emitted]
          App_Resources/Android/src/main/res/drawable-mdpi/baseline_add_white_36.png   138 bytes          [emitted]
          App_Resources/Android/src/main/res/drawable-mdpi/baseline_add_white_48.png    97 bytes          [emitted]
   App_Resources/Android/src/main/res/drawable-mdpi/baseline_arrow_back_white_18.png   128 bytes          [emitted]
   App_Resources/Android/src/main/res/drawable-mdpi/baseline_arrow_back_white_24.png   132 bytes          [emitted]
   App_Resources/Android/src/main/res/drawable-mdpi/baseline_arrow_back_white_36.png   171 bytes          [emitted]
   App_Resources/Android/src/main/res/drawable-mdpi/baseline_arrow_back_white_48.png   170 bytes          [emitted]
                           App_Resources/Android/src/main/res/drawable-mdpi/icon.png    3.42 KiB          [emitted]
                           App_Resources/Android/src/main/res/drawable-mdpi/logo.png    15.8 KiB          [emitted]
                           App_Resources/Android/src/main/res/drawable-mdpi/menu.png   235 bytes          [emitted]
                 App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml   304 bytes          [emitted]
                    App_Resources/Android/src/main/res/drawable-xhdpi/background.png    5.26 KiB          [emitted]
         App_Resources/Android/src/main/res/drawable-xhdpi/baseline_add_white_18.png   138 bytes          [emitted]
         App_Resources/Android/src/main/res/drawable-xhdpi/baseline_add_white_24.png    97 bytes          [emitted]
         App_Resources/Android/src/main/res/drawable-xhdpi/baseline_add_white_36.png    97 bytes          [emitted]
         App_Resources/Android/src/main/res/drawable-xhdpi/baseline_add_white_48.png   102 bytes          [emitted]
                                                                                0.js    11.8 KiB       0  [emitted]
  App_Resources/Android/src/main/res/drawable-xhdpi/baseline_arrow_back_white_24.png   170 bytes          [emitted]
  App_Resources/Android/src/main/res/drawable-xhdpi/baseline_arrow_back_white_36.png   203 bytes          [emitted]
  App_Resources/Android/src/main/res/drawable-xhdpi/baseline_arrow_back_white_48.png   261 bytes          [emitted]
                          App_Resources/Android/src/main/res/drawable-xhdpi/icon.png    10.4 KiB          [emitted]
                          App_Resources/Android/src/main/res/drawable-xhdpi/logo.png      54 KiB          [emitted]
                          App_Resources/Android/src/main/res/drawable-xhdpi/menu.png   297 bytes          [emitted]
                   App_Resources/Android/src/main/res/drawable-xxhdpi/background.png    10.3 KiB          [emitted]
        App_Resources/Android/src/main/res/drawable-xxhdpi/baseline_add_white_18.png   158 bytes          [emitted]
        App_Resources/Android/src/main/res/drawable-xxhdpi/baseline_add_white_24.png    97 bytes          [emitted]
        App_Resources/Android/src/main/res/drawable-xxhdpi/baseline_add_white_36.png   186 bytes          [emitted]
        App_Resources/Android/src/main/res/drawable-xxhdpi/baseline_add_white_48.png   113 bytes          [emitted]
 App_Resources/Android/src/main/res/drawable-xxhdpi/baseline_arrow_back_white_18.png   176 bytes          [emitted]
 App_Resources/Android/src/main/res/drawable-xxhdpi/baseline_arrow_back_white_24.png   203 bytes          [emitted]
 App_Resources/Android/src/main/res/drawable-xxhdpi/baseline_arrow_back_white_36.png   253 bytes          [emitted]
 App_Resources/Android/src/main/res/drawable-xxhdpi/baseline_arrow_back_white_48.png   275 bytes          [emitted]
                         App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png    20.3 KiB          [emitted]
                         App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png     116 KiB          [emitted]
                         App_Resources/Android/src/main/res/drawable-xxhdpi/menu.png   378 bytes          [emitted]
                  App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png    3.87 KiB          [emitted]
       App_Resources/Android/src/main/res/drawable-xxxhdpi/baseline_add_white_18.png    97 bytes          [emitted]
       App_Resources/Android/src/main/res/drawable-xxxhdpi/baseline_add_white_24.png   102 bytes          [emitted]
       App_Resources/Android/src/main/res/drawable-xxxhdpi/baseline_add_white_36.png   113 bytes          [emitted]
       App_Resources/Android/src/main/res/drawable-xxxhdpi/baseline_add_white_48.png   116 bytes          [emitted]
App_Resources/Android/src/main/res/drawable-xxxhdpi/baseline_arrow_back_white_18.png   203 bytes          [emitted]
App_Resources/Android/src/main/res/drawable-xxxhdpi/baseline_arrow_back_white_24.png   261 bytes          [emitted]
App_Resources/Android/src/main/res/drawable-xxxhdpi/baseline_arrow_back_white_36.png   275 bytes          [emitted]
App_Resources/Android/src/main/res/drawable-xxxhdpi/baseline_arrow_back_white_48.png   408 bytes          [emitted]
                        App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png    73.8 KiB          [emitted]
                        App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png     193 KiB          [emitted]
                        App_Resources/Android/src/main/res/drawable-xxxhdpi/menu.png   466 bytes          [emitted]
                     App_Resources/Android/src/main/res/drawable/baseline_add_24.xml   384 bytes          [emitted]
              App_Resources/Android/src/main/res/drawable/baseline_arrow_back_24.xml   411 bytes          [emitted]
                            App_Resources/Android/src/main/res/values-v21/colors.xml   104 bytes          [emitted]
                            App_Resources/Android/src/main/res/values-v21/styles.xml  1020 bytes          [emitted]
                                App_Resources/Android/src/main/res/values/colors.xml   237 bytes          [emitted]
                                App_Resources/Android/src/main/res/values/styles.xml    1.68 KiB          [emitted]
                                                               fonts/FontAwesome.ttf     162 KiB          [emitted]
                                                               assets/login-logo.png    11.8 KiB          [emitted]
                                                                     assets/logo.png    16.3 KiB          [emitted]
                                                                        package.json    82 bytes          [emitted]
                                                                          starter.js    39 bytes          [emitted]
                                                                 tns-java-classes.js     0 bytes          [emitted]
[../$$_lazy_route_resource lazy recursive] ../$$_lazy_route_resource lazy namespace object 160 bytes {bundle} [built]
[./app.scss] 21.3 KiB {bundle} [built]
[./app/app-routing.module.ts] 791 bytes {bundle} [built]
[./app/app.component.html] 3.18 KiB {bundle} [built]
[./app/app.component.ts] 4.64 KiB {bundle} [built]
[./app/app.config.ts] 1.89 KiB {bundle} [built]
[./app/app.http-interceptor.ts] 1.4 KiB {bundle} [built]
[./app/app.module.ts] 1.33 KiB {bundle} [built]
[./app/login/login.module.ts] 773 bytes {0} [built]
[./main.ts] 620 bytes {bundle} [built]
[./package.json] 82 bytes {bundle} [optional] [built]
[./services/feedback.service.ts] 552 bytes {bundle} [built]
[./services/login.service.ts] 1.95 KiB {bundle} [built]
[./services/master.service.ts] 1.18 KiB {bundle} [built]
[./services/storage.service.ts] 1.22 KiB {bundle} [built]
    + 472 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Executing before-shouldPrepare hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-shouldPrepare/nativescript-dev-webpack.js
Executing before-cleanApp hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-cleanApp/nativescript-dev-webpack.js
Executing before-prepare hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-prepare/nativescript-dev-sass.js
Hook skipped because either bundling or livesync is in progress.
Executing before-prepare hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-prepare/nativescript-dev-typescript.js
Hook skipped because either bundling or livesync is in progress.
Preparing project...
Executing before-prepareJSApp hook from /Users/rahulgavande/Projects/production/cloint/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Gradle clean...
         + setting applicationId
         + applying user-defined configuration from /Users/rahulgavande/Projects/production/cloint/App_Resources/Android/app.gradle
         + adding nativescript runtime package dependency: nativescript-optimized-with-inspector
         + adding aar plugin dependency: /Users/rahulgavande/Projects/production/cloint/node_modules/nativescript-camera/platforms/android/nativescript_camera.aar
         + adding aar plugin dependency: /Users/rahulgavande/Projects/production/cloint/node_modules/nativescript-ui-sidedrawer/platforms/android/TNSSideDrawer-release.aar
         + adding aar plugin dependency: /Users/rahulgavande/Projects/production/cloint/node_modules/nativescript-web-image-cache/platforms/android/nativescript_web_image_cache.aar
         + adding aar plugin dependency: /Users/rahulgavande/Projects/production/cloint/node_modules/nativescript-ui-core/platforms/android/TNSCore-release.aar
         + adding aar plugin dependency: /Users/rahulgavande/Projects/production/cloint/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
Unable to apply changes on device: emulator-5554. Error is: cp: cannot create directory '/Users/rahulgavande/Projects/production/cloint/platforms/android/app/src': No such file or directory.
Executing after-watch hook from /Users/rahulgavande/Projects/production/cloint/hooks/after-watch/nativescript-dev-sass.js
Executing after-watch hook from /Users/rahulgavande/Projects/production/cloint/hooks/after-watch/nativescript-dev-typescript.js
Executing after-watch hook from /Users/rahulgavande/Projects/production/cloint/hooks/after-watch/nativescript-dev-webpack.js
Stopping webpack watch 
tsonevn commented 5 years ago

Hi @gavande, Try to clear up the project and then to rebuild it. Check out the steps below:

  1. delete node_modules, platforms, hooks folders, webpack.config.js and package-lock.json files.
  2. run npm install
  3. remove the app from the device or simulator.
  4. rebuild the project -> tns run <platform name> --bundle
rahi-cube commented 5 years ago

@tsonevn Thanks for the reply.

I have tried this multiple times. but no luck.

tsonevn commented 5 years ago

Hi @gavande, Can you send us the project or sample one, which can be used for recreating the issue?

rahi-cube commented 5 years ago

@tsonevn Here is the link to Project my observation says that there is an issue with either live reload or webpack.

tsonevn commented 5 years ago

HI @gavande, Thank you for the sample project. I built it on my side, however, was unable to recreate the problem. I also reviewed the info in your very first comment, and I have noticed that you are mentioning that the error appears when you interrupt the build and then start again the tns run android --bundle command. If this is the case, the problem might be related to the fact that the CLI is trying to access some corrupted folder or files. Regarding that, can you try clearing up the project while following the provided steps in my previous comment and build the project again with tns run android --bundle without interrupting the build process.

Let me know if I am missing something.

tsonevn commented 5 years ago

closing due to inactivity

HugoAntares commented 5 years ago

I still have this issue, and a LOT more ! Can't build build for Android. Last week it worked for iOS, today it doesn't and throws this error: Unable to apply changes on device: ***. Error is: cp: no such file or directory: /platforms/android/***/app/*.

ngstwr commented 5 years ago

Same issue, I am on nativescript-vue!

tsonevn commented 5 years ago

HI @HugoAntares @ngstwr, Try to clear up the project and then to rebuild it. Check out my previous comment. Also, can you provide more info about the exact steps, that you are using, while building the app?

span commented 5 years ago

Getting this a lot as well.

Unable to apply changes on device: emulator-5554. Error is: cp: cannot create directory '/Users/daniel-op/development/nativescript/SimpleStats/platforms/android/app/src': No such file or directory.
Will emit event liveSyncError with data { error: Error: cp: cannot create directory '/Users/daniel-op/development/nativescript/SimpleStats/platforms/android/app/src': No such file or directory
    at Object.error (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/common.js:112:27)
    at /usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:246:18
    at Array.forEach (<anonymous>)
    at Object._cp (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:225:11)
    at Object.cp (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/common.js:365:25)
    at FileSystem.copyFile (/usr/local/lib/node_modules/nativescript/lib/common/file-system.js:220:17)
    at PreparePlatformNativeService.prepareAppResources (/usr/local/lib/node_modules/nativescript/lib/services/prepare-platform-native-service.js:86:30)
    at PreparePlatformNativeService.<anonymous> (/usr/local/lib/node_modules/nativescript/lib/services/prepare-platform-native-service.js:44:22)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/nativescript/lib/services/prepare-platform-native-service.js:10:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7),
  deviceIdentifier: 'emulator-5554',
  projectDir: '/Users/daniel-op/development/nativescript/SimpleStats',
  applicationIdentifier: 'net.danielkvist.simplestats' }
Project dir from hooksArgs is: /Users/daniel-op/development/nativescript/SimpleStats.

Removing platforms directory always solves it.

I get the error every time I ctrl-c out of tns run and then try to run again. Been trying to use lsof to find out if another file is locking the directory because it does really exist.

I'm on latest node and tns. Will keep an eye out for what is causing it.

massolarinasajon commented 5 years ago

Getting this a lot as well.

Unable to apply changes on device: emulator-5554. Error is: cp: cannot create directory '/Users/daniel-op/development/nativescript/SimpleStats/platforms/android/app/src': No such file or directory.
Will emit event liveSyncError with data { error: Error: cp: cannot create directory '/Users/daniel-op/development/nativescript/SimpleStats/platforms/android/app/src': No such file or directory
    at Object.error (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/common.js:112:27)
    at /usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:246:18
    at Array.forEach (<anonymous>)
    at Object._cp (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/cp.js:225:11)
    at Object.cp (/usr/local/lib/node_modules/nativescript/node_modules/shelljs/src/common.js:365:25)
    at FileSystem.copyFile (/usr/local/lib/node_modules/nativescript/lib/common/file-system.js:220:17)
    at PreparePlatformNativeService.prepareAppResources (/usr/local/lib/node_modules/nativescript/lib/services/prepare-platform-native-service.js:86:30)
    at PreparePlatformNativeService.<anonymous> (/usr/local/lib/node_modules/nativescript/lib/services/prepare-platform-native-service.js:44:22)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/nativescript/lib/services/prepare-platform-native-service.js:10:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:160:7),
  deviceIdentifier: 'emulator-5554',
  projectDir: '/Users/daniel-op/development/nativescript/SimpleStats',
  applicationIdentifier: 'net.danielkvist.simplestats' }
Project dir from hooksArgs is: /Users/daniel-op/development/nativescript/SimpleStats.

Removing platforms directory always solves it.

I get the error every time I ctrl-c out of tns run and then try to run again. Been trying to use lsof to find out if another file is locking the directory because it does really exist.

I'm on latest node and tns. Will keep an eye out for what is causing it.

Same here on Nativescript-vue. When I run tns platform clean android it works, but its annoying to clean everytime i quit from tns run

dscirto commented 5 years ago

Can this be re-opened? I also have to run tns platform clean android in my NativeScript-Angular project before running any tns debug android -- huge burden when testing across multiple devices. This will also happen when doing something like:

tns platform clean android tns debug android --bundle --device some-device <-- Successful tns debug android --bundle --device some-other-device <-- Executed in a different terminal window, fails

Whether or not that flow is appropriate, I think it may also hint at a failed attempt to access locked/corrupt files.

NativeScript CLI 6.0.2 tns-ios / tns-android 6.0.1

"dependencies": {
  "@angular/animations": "~8.0.0",
  "@angular/common": "~8.0.0",
  "@angular/compiler": "~8.0.0",
  "@angular/core": "~8.0.0",
  "@angular/forms": "~8.0.0",
  "@angular/http": "~8.0.0-beta.10",
  "@angular/platform-browser": "~8.0.0",
  "@angular/platform-browser-dynamic": "~8.0.0",
  "@angular/router": "~8.0.0",
  "nativescript-angular": "~8.0.0",
  "nativescript-oauth2": "^1.4.3",
  "nativescript-theme-core": "~1.0.6",
  "nativescript-ui-dataform": "5.0.0",
  "nativescript-ui-gauge": "5.0.0",
  "nativescript-ui-listview": "7.0.1",
  "reflect-metadata": "~0.1.12",
  "rxjs": "~6.5.0",
  "rxjs-compat": "^6.5.2",
  "tns-core-modules": "~6.0.0",
  "zone.js": "~0.9.1"
},
"devDependencies": {
  "@angular/compiler-cli": "~8.0.0",
  "@ngtools/webpack": "~8.0.0",
  "nativescript-dev-webpack": "~1.0.0",
  "typescript": "~3.4.0"
}
tsonevn commented 5 years ago

Hi @dscirto, Can you open a new issue about the problem you are facing? It will help if you provide a sample project, that can be used for debugging as well as more info about the device that you are using for testing.

dscirto commented 5 years ago

@tsonevn sure thing -- I'll try and get to this by the end of the week

JungMinHur commented 4 years ago

I have the same issue after falsly(?) using tns resources generate icons I have entered the wrong image directory and the error message is keep poping the false directory I have entered before, and it did not get away after cleaning process mentioned above

Mixelated commented 4 years ago

Removed all hooks, node_modules, webpack config, removed and readded platform and still receiving the error that the directory cannot be created. I suspect it has something to do with android assets as I recently added new images to the app_resources folder

JungMinHur commented 4 years ago

@Mixelated yes, I think you are right, this happens when I add images into App_Resources/Android/src/main/res simply deleting the image solved the problem, but after deleting the image, I can still use it by accessing 'res://yourImagename'.

Mixelated commented 4 years ago

Perhaps I will try that. Did you try making a production build to see if the image is still available?

JungMinHur commented 4 years ago

@Mixelated yes I've tried it and it worked, unless you don't executetns platform clean android

dimitriospafos commented 4 years ago

I had the same issue.

The problem was that when adding images to Android resources, the images needed to have Read&Write permissions. Having Read Only permissions was giving me that error.