android studio example crashes at startup

The example provided on the android processing site does not work.

https://android.processing.org/tutorials/android_studio/index.html

I think it might have something to do with permissions. Any help would be great, I have tried things for the last week and nothings worked.

I have even tried the solutions in the migrating to androidX issue request and am pointing the program to processing build 4.11