NativeScript Logic Won't Work

nativescriptcore
plugins

#1

Hello, I’m having a problem with developing some apps. from time to time, I come to an strange error where the logic of my apps, simply won’t work anymore. Let’s say for example, with the Groceries example, I was developing as usual, but when I save the project, and the application was updated in the phone, the login button didn’t work anymore. Recently I had the same problem creating a custom login page that had a dropdown (from this page: https://www.npmjs.com/package/nativescript-drop-down) I simply created a new function for detecting the selected index change:

function dropDownSelectedIndexChanged(args) {
console.log("Drop Down selected index changed from " + args.oldIndex + " to " + args.newIndex);
}
exports.dropDownSelectedIndexChanged = dropDownSelectedIndexChanged;

I just literally wrotte just this, and when the applicaction was updated, the dropdown couldn’t be populated again, just leaving me with the hint, and I didn’t even touch the function to populate the dropdown. I tried erasing what I just wrote, but the application won’t work anymore.

The only solution I have found to soive this, was the same solution I ended up applying to the Groceries tutorial, was creating a new project, and copyng and pasting all the code from the previous version, and it indeed, works, so it isn’t a problem with the code.

I would like to know if I am the only that has encountered this problem, and if someone else had encontered it before, if he/she had found a solution.

Many thanks in advance.


#2

Did you try removing the platform with “tns platform remove android” and then running “tns run android”?