When switching from sdk 4.0.10 to sdk 4.2.2: Problem with types (e.g. Number)

I am new to Monkey C and trying to edit an app such that it works for the forerunner 955.

The app I found works with sdk 4.1.5 but not with 4.1.6 and especially not 4.2.2 (which is required for furerunner 955).

I get errors like: Cannot resolve type 'Number'. for this line of code: 

class TimeFactory extends Ui.PickerFactory {
    private var _start as Number;

I cannot find the documentation for the changes of the sdk.
Is there a change in the sdk that I am unaware of or what could be the problem here?

Would be thankful for every guidance!
  • Starting with 4.1.6, type checking is on by default.

    As a test, in your project's monkey.jungle file, add the following line:

    project.typecheck=0

    This will turn typechecking off for that project and you can see if it still has errors.

    Another thing to try is to add

    import Toybox.Lang;

    in the mc file

    By the way, the latest SDK is 6.2.0.  See News and Announcements

  • thank you very much for your fast reply!

    It was indeed the typechecking option and I now don't get the errer anymore when I import Toybox.Lang;

    However I now get an error with FontDefinition, Drawable, Dc, Boolean, Array and again Number.

    Does a similar import exist for this?

    The line in the code is e.g.

    public function onAccept(values as Array<Number?>) as Boolean {

    Edit: It missed the import statement in another file. 

    For additional types (FontDefinition, Drawable) I just need these imports and now its working:

    import Toybox.Lang;
    import Toybox.Graphics;
    import Toybox.WatchUi;