I determined that the problem is caused by ProGuard, by following a suggestion to disable ProGuard. The program runs if i change minifyEnabled to false or if i simply delete the two lines ...
Now i do not know what to do next. I do not want to post a bunch of code etc since i do not know what is needed. Also i do not know how to run the release APK with debugging or how to get a stack trace or other debugging information from a release build.
BTW, every line of my build.gradle file is haunted by the "cannot be applied to '(groovy.lang.Closure)'" warnings, but my research tells me that this a harmless Android Studio bug with no reliable workaround and would be unrelated.
I have a feeling that this is a common problem with a well known solution but i have not been able to find much discussion on various forums. Any guidance much appreciated,