I updated to Android Studio 3.1 and as suggested by Android Studio also:
Solution from kekkou of the libgdx forums: http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=27639&p=109249#p109249
His solution is: Move the project(':android') {}
block in root build.gradle into android\build.gradle.
This makes all commands work again. I did not find any downsides.
The commit for this fix on my project: https://github.com/Leejjon/BluffPoker/commit/d10deb090c2d80e641d733efdaa85f99c0a9fe2f