(Happens also with a plain new project tns create aaa --ng , details below) :
In our project we used this simple package.json file.
Notice :
"tns-platform-declarations": "~4.0.0",
Now let's see the d.ts files for android :

OK. let's run tsc ------>

All OK.
Additionally ( just saying it now to show that all ok for now in this code ) - we extend an Activity :

All OK - No errors.
Now let's update tns-platform-declarations to 4.2.0 :
So I'm changing to
"tns-platform-declarations": "^4.2.0",
Now let's npm install tns-platform-declarations ( ack : installed OK)
Now the folder has changed ( obviously):

But now - Native android code ( in extending activity) doesn't get compiled:

You can also see this error with tsc :

More , if I remove this method , it yells on other things :

So basically the new dt.s are causing compilation errors.
If I revert back to "tns-platform-declarations": "~4.0.0", - the error disappear.
It happens also with PLAIN new project tns create aaa --ng , ( just add the additional activity file)

Hey @RoyiNamir which declaration file are you using? Can you post your reference.d.ts content
Hey @NickIliev
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
You can create a new project (tns create aaa --ng ), and add tns-platform-declarations ( 4.2.0!) and add this file ^ (references.d.ts)
And see that it happens also there ( when you add this activity file)
Here is the activity file : https://gist.github.com/RoyiNamir/e84420a9bb67636f2e08388a611af658
(same as in here)
Here is a demo plain new project: https://ufile.io/mzon5
Hi @RoyiNamir, You will need to change all the methods to be public, because that's how we generate the typings now, we don't have protected methods anymore. About the error for the onRequestPermissionsResult you need to change the type to Array<string>, string need to be lowercase and it should work.
@vtrifonov Hi.
Thanks for reply.
I've already solved it in my code like you said :-)
But I think ( Just suggesting of course) that this should be reported as
"a breaking change" pretty quickly so that people won't think that that there's a problem with NS 4.2 ( when they upgrade)
Becuase if you now tns create aaa --ng and npm install tns-platform-declerations , it will install the 4.2 declarations - which causes current(!) code to break.
If it's not a bug - then it should be written in the upgrade instructions that "from now on... you should s and not S , and public/protected switches).
Thanks for the suggestion, we have added those breaking changes to the NativeScript changelog