Theme: An Internal Server Error Occurred

I am trying to create a new theme on cake 3.6., called “Twit”
I have already created all the directory tree:

/plugins/Twit/src/Template/… (Layout, Pages, etc…)

The Default theme is up and running w/o any problem, but whenever i try to call the theme “Twit”, by using on AppController.php:

public function beforeRender(\Cake\Event\Event $event) {

  $this->viewBuilder()->setTheme('Twit');

}

it returns:

An Internal Server Error Occurred

Any clues?

Switch on debug and check your error log

same error;
debug true;
someone fixed?
Thanks;
For me, this error occurred after I updated a project from 3.2 for 3.8;
Someone help us. please!

Have you followed the release notes for all the upgrades between 3.2 and 3.8? The names and locations of some functions have changed.

The same for me starting from a fresh 3.8 installation.