Android Question FireBaseAdMob causing compilations problems

Kevin

Well-Known Member
Licensed User
Longtime User
I added this library to my project and with it, I cannot get through compiling the app (and it is a small, simple app).

I get this:
B4A Version: 8.00
Parsing code. (0.03s)
Compiling code. (0.23s)
Compiling layouts code. (0.14s)
Organizing libraries. (6.20s)
Generating R file. (1.22s)
Compiling generated Java code. (8.25s)
Convert byte code - optimized dex. Error
Process timed out.
You can change it under Tools - IDE Options.

I haven't adjusted the timeout period yet because this just can't be right. Without the FireBaseAdMob library, the app compiles in about 10-12 seconds.
 

Kevin

Well-Known Member
Licensed User
Longtime User
That was it. My config file had it set to 512 and after changing it to 1024, it compiled as quickly as usual.

On a side note, my system has 6 GB of RAM. I'm not sure if the 512 MB is just a default or if it is based on available RAM and set on first run, but perhaps you could consider changing the default to 1024. That or maybe add it to the 'Tools>IDE Options' menu right next to Configure Process Timeout - or just put both settings in a small 'Advanced' window.

Just a thought, and I'm definitely not complaining about a manual edit. Just reading about all of the improvements made to B4A over the past few years while I was away has got me pretty excited. But then, I'm a bit of a geek. :D
 
Last edited:
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I noticed my apk went from around 300kb to 1.9mb only by adding firebase ads library.

I saw another post mentioning that you can exclude certain classes (Google classes) and that only made a few kb difference. That was for b4a 6, so perhaps b4a since then does this sort of optimization automatically?

Anyway, if that's the price for me to pay for firebase ads then so be it, but I just wanted to make sure I wasn't missing something.

Edit: I was following the instructions on the post about integrating the firebase library into a project. I'm on my phone right now so I can't easily post links.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
but perhaps you could consider changing the default to 1024
The default is indeed 1024mb. Your setting was kept from an old version of B4A.

I saw another post mentioning that you can exclude certain classes (Google classes)
Don't do it. It is not needed in newer versions of B4A.

I noticed my apk went from around 300kb to 1.9mb only by adding firebase ads library.
It is actually Google Play Services that is a large library. Firebase services depend on it. This means that you can add more "google libraries" and they will not add much.
 
Upvote 0
Top