Android Question Firebase Admob Compile error java.lang.OutOfMemoryError

Status
Not open for further replies.

trueboss323

Active Member
Licensed User
Longtime User
I have followed this tutorial:
https://www.b4x.com/android/forum/t...tegrated-with-firebase-backend.67710/#content
And this tutorial:
https://www.b4x.com/android/forum/threads/firebaseadmob-v1-6.108552/

Ever since I added the Firebase Admob to my project , it would not compile and I get the following error.

B4A Version: 9.30
Java Version: 8
Parsing code. (0.18s)
Building folders structure. (0.10s)
Compiling code. (2.26s)
Compiling layouts code. (0.08s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. (0.00s)
Compiling debugger engine code. (5.80s)
Compiling generated Java code. (10.81s)
Convert byte code - optimized dex. Error
UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: GC overhead limit exceeded
 

trueboss323

Active Member
Licensed User
Longtime User
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?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
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.
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User

Hi Erel!

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.

What can I do... You see my other thread:
https://www.b4x.com/android/forum/threads/firebase-admob-increase-the-cpu-usage-dramatically.118946/

Regards
ARTsoft
 
Upvote 0
Status
Not open for further replies.
Top