Thanks Erel , that fixed the problem. But now the compilation time has significantly increased 30+ seconds because I added the Firebase Admob library. Is this normal or is there a way to decrease the compilation time?
FirebaseAdMob relies on many components in Google Play Services. So it is expected to make compilation slower, however 30 seconds is quite a lot.
On my computer a first compilation of a project with Firebase takes about 10 seconds. Further compilations take less.
It is possible that the optimized dexer will fail from time to time and will cause the compilation to take longer. Don't try to compile very frequently to test speeds as it will be slower.
In my case the size is set to 4GB (!!!!!) ... But come on: This is the half of my complete RAM.
And it is no possible to compile the project anymore ... after unloading Firebase Admob: the CPU comes down again, the compiler runs normally again and working on my PC is possible again.