'Android' does not contain type or namespace 'android'. Could you be missing a package reference?

In my app I have the following code to close the app:

using Uno;
using Uno.Collections;
using Fuse;
using Android.android.os;
using Android.android.app;
using Android.android.content;
using Android.android.net;
using Android.Base;
using Fuse.Triggers.Actions;

public class ExitApp : TriggerAction
{
  protected override void Perform(Node target)
  {
    if defined(Android)
    {
      var a = Activity.GetAppActivity();
      a.finish();
    }
    else {
      debug_log "ExitApp only defined for Android";
    }
  }

}

This code work in previous versions but now in 0.35.0 i get this:

ExitApp.uno(4.15): E3111: 'Android' does not contain type or namespace 'android'. Could you be missing a package reference?
ExitApp.uno(5.15): E3111: 'Android' does not contain type or namespace 'android'. Could you be missing a package reference?
ExitApp.uno(6.15): E3111: 'Android' does not contain type or namespace 'android'. Could you be missing a package reference?
ExitApp.uno(7.15): E3111: 'Android' does not contain type or namespace 'android'. Could you be missing a package reference?

How can I solve this?

Thanks!

Solved thanks to @bolav

using Uno;
using Uno.Collections;
using Fuse;
using Uno.Compiler.ExportTargetInterop;
using Fuse.Triggers.Actions;

public class ExitApp : TriggerAction
{
  protected override void Perform(Node target)
  {
    if defined(Android)
    {
      doit();
    }
    else {
      debug_log "ExitApp only defined for Android";
    }
  }

  [Foreign(Language.Java)]
  void doit() 
  @{
  com.fuse.Activity.getRootActivity().finish();
  @}

}

That will indeed work. Note of course that such behavior is strongly discouraged by Google so dont expose that functionality to your users.

[edit] I worded this quite strongly. Terminating the app is strongly discouraged, calling finish based on user input is just frowned upon. I’ll try find some links on the subject soon