I have updated nativescript to 4.2.0 and my application is not updating on emulator and also on real devices on ### debug or livesync.
Updating the application on emulator is also not working in 4.0 but in real device it works , as i update to 4.2.0 it also not updating on Real Devices.
I have to run
tns debug android --clean
in order to update my application :( .
please help to solve this bug.
hear are my assets
Package.json
{
"name": "tradelive",
"version": "1.0.0",
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.tradelivemobile",
"tns-ios": {
"version": "4.2.0-rc-2018-07-26-01"
},
"tns-android": {
"version": "4.2.0"
}
},
"scripts": {
"tslint": "tslint -p tsconfig.json"
},
"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",
"@types/lodash": "^4.14.91",
"@wwwalkerrun/nativescript-ngx-magic": "^2.0.4",
"angular2-jwt": "^0.2.3",
"js-data": "^3.0.1",
"js-data-http": "^3.0.0",
"lodash": "^4.17.4",
"nativescript-angular": "^6.1.0",
"nativescript-badge-button": "^0.1.2",
"nativescript-barcodescanner": "^2.7.3",
"nativescript-bottombar": "^3.0.7",
"nativescript-checkbox": "^3.0.3",
"nativescript-dev-webpack": "^0.15.1",
"nativescript-email": "^1.5.2",
"nativescript-exit": "^1.0.1",
"nativescript-feedback": "^1.1.0",
"nativescript-floatingactionbutton": "^4.1.3",
"nativescript-google-maps-sdk": "^2.6.0",
"nativescript-loading-indicator": "^2.4.0",
"nativescript-localstorage": "^1.1.5",
"nativescript-material-icons": "^1.0.3",
"nativescript-ng-shadow": "^2.1.0",
"nativescript-pager": "^8.0.2",
"nativescript-permissions": "^1.2.3",
"nativescript-phone": "^1.3.1",
"nativescript-pro-ui": "^3.2.0",
"nativescript-ripple": "^2.0.0",
"nativescript-snackbar": "^2.0.0",
"nativescript-theme-core": "^1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-web-image-cache": "^4.2.6",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.1.0",
"rxjs-compat": "6.1.0",
"tns-core-modules": "^4.2.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"@angular/compiler-cli": "~6.1.0",
"@ngtools/webpack": "~6.1.0",
"@types/core-js": "^0.9.36",
"@types/jasmine": "^2.8.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"codelyzer": "^4.0.2",
"lazy": "1.0.11",
"nativescript-dev-typescript": "^0.7.2-2018-08-14-01",
"tslint": "^5.8.0",
"typescript": "^2.4.2"
}
}
tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"declaration": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"lib": [
"es5",
"es2015",
"dom",
"scripthost",
"es6",
"es2015.iterable"
],
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"typeRoots": [
"node_modules/@types",
"node_modules"
],
"types": [
"jasmine",
"core-js"
],
"baseUrl": ".",
"paths": {
"*": [
"./node_modules/tns-core-modules/*",
"./node_modules/*"
],
"~/*": [
"app/*"
]
}
},
"exclude": [
"node_modules",
"platforms",
"**/*.aot.ts"
]
}
references.d.ts
/// <reference path="./node_modules/tns-core-modules/tns-core-modules.d.ts" /> /// <reference path="./node_modules/typescript/lib/lib.d.ts" />
Hi @tahir-jamil,
In case you are changing the tns-core-modules version manually in the package.json file, you should delete platforms, node_modules folders and package-lock.json files from the project and then rebuild it. Try the below-attached steps and check if you will have the same issue:
node_modules, platforms, hooks folderspackage-lock.json filetns run android or tns run iosAlso, you can check out this article from the docs, where it is described, how to update all project.
Let me know if I am missing something or if the case is different.
ya i have done that many times delete
node_modules, platform , hooks
but it still not updating
Hi @tahir-jamil,
The issue, you are facing can be related to issue #2730, where it is described a problem with deleting the old app files from the device's tmp folder.
There is two option for validating whether this is the case:
Build a .apk in release mode and deploy it on a device. When the application is built in a release, it will not check the /data/local/tmp/<appid>/ directory and will not sync files from there.
Remove the /data/loca/tmp/<appid>/ from device. In order to do this, execute:
$ $ANDROID_HOME/platform-tools/adb shell
$ cd /data/local/tmp
$ rm -rf <your app id>
And deploy the built .apk again.
Can you also provide more info about the device, which you are using?
ya i am using Q Z12 pro
Hi @tahir-jamil,
Were you able to resolve the issue, while deleting the tmp folder from the device?
well its not
and i shift my nativescript version to 4.0 so can i debug easily and have check this yet weather it is solved or not i will inform you after testing it
its working don't know how but it works