Android Question Google Maps...Blank/Empty screen

Indy

Active Member
Licensed User
Longtime User
Hi Folks,

I'm going to apologise straight away as this is going to be one of those typical Google maps issues, which I know has been covered many times but, I'm hoping my instance might be a little different, so here goes;

I already have an app using Google maps and it works fine, map is displayed as expected, no blank screen. However, recently I had to make some changes to the code (after 5 years) and so have to recompile things. The first issue I had was my setup for this project was quite old. Things have cleary moved on since 2016 when it comes down to using maps. So, having got all that reconfiguration out the way (thanks DonManFred), things started to compile perfectly. However, upon testing the mapping, nothing! Blank Google screen with just the zoom buttons. So did the obvious and read a lot of the other posts relating to the same issue and most pointed towards a possible invalid API key. That's probably a 8/10 explanation but, what's confusing me is why is the old version still working using the key I created 5 years ago but, not the new version? Just to prove if it's the key or not I even tried the example Google map apk from this forum and that has the same issue, which made me think it can't be the key then.

I did a clean setup of the current release version of B4X along with OpenJavaJDK. Could it be that JDK that's the issue? Also, I haven't downloaded the Android SDK, I just downloaded the required files manually (as per h.ttps://www.b4x.com/b4a.html) and referenced them in the file path setting in B4X. Does anyone have any ideas what it could be? Could it still be the API key?

Thanks
 

TILogistic

Expert
Licensed User
Longtime User
if i change the version from B4A to 10.6 or 10.7


Paths Configurations:
JDK 11
SDK Android 29 or 30


1615127472351.png


Library:

1615127622270.png


Jetifier:

1615127824438.png


Manifiest:

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="29"/>
'************ GoogleMaps ************

CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

AddApplicationText(
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOU-API-KEY"/>
)

AddApplicationText(
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
)
 
Upvote 0

Indy

Active Member
Licensed User
Longtime User
No.

I recommend you to start a new project based on the tutorial: https://www.b4x.com/android/forum/threads/google-maps.63930/#content
Make sure that the package name and signing key are correct.
Check the logs, including the unfiltered logs.

Hi Erel,

Unfortunately, no luck I'm afraid.

I've done everything you asked but, unsure what you mean by making sure the package name and signing key are correct. How does one do that? Also, I did turn on unfiltered logs but, that it's far too quick to read and difficult to copy the contents quick enough. Is there a way of pausing the output so I can examine it?

The other thing I was going to ask is if someone can provide me with the apk of the test project so I can see whether it's my API key or not.

Thanks
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
use:

 
Upvote 0
Top