Problem Compiling Google Maps Test Code

Hilton

Active Member
Licensed User
Longtime User
Hi folks,

I followed the steps in the Maps tutorial to the best of my ability, however, when I compile the test code that came with the tutorial I get:

Parsing code. 0.08
Compiling code. 0.17
Compiling layouts code. 0.02
Generating R file. 0.39
Compiling generated Java code. Error
B4A line: 30
gmap.AnimateCamera(cp)
javac 1.7.0_03
src\b4a\micalls\cust.java:298: error: package com.google.android.gms.maps.model does not exist
mostCurrent._gmap.AnimateCamera((com.google.android.gms.maps.model.CameraPosition)(_cp.getObject()));
^
1 error

I have spent hours trying to figure out what step I have missed or misunderstood but to no avail. I find the google documentation difficult to understand as I am new to Android os. Does anyone have any ideas, please.

Thanks,
Hilton.
 

Hilton

Active Member
Licensed User
Longtime User
Yes and I have also checked GoogleMaps(version:1.00) in the Libs tag on the rhs of the ide.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I did a small test and removed google-play-services.jar from the libraries folder. I got this exact error. I'm pretty sure that the compiler isn't able to find this jar. Make sure that it was copied to the correct folder. If you copied it to the internal libraries folder (under Program Files), Windows might have put it in a virtual folder.
 
Upvote 0

Hilton

Active Member
Licensed User
Longtime User
Hi Erel,

I did copy the .jar file, however, I noticed there was another file with the same name (different extension). I copied both and the problem disappeared. However, I discovered I had to make my key file readonly. That's another problem and I must simply go thru the process again.

The real problem was that I did not copy BOTH google-play-services files.

I will press on, but thank you very much for your prompt attention to my question.

Bye,
Hiltonl
 
Upvote 0

Hilton

Active Member
Licensed User
Longtime User
Now that the compilation is fine, I have reached the stage of getting a white screen. I have checked the SHA1: entry in the ide with that in the google console and they are ok.
I have appended a semi_colon and the package name from the ide (b4a.micalls). I have double checked the key generated in google console (key for android apps(with certs)) with that in the ide manifest file and they are the same.

Is there any other item that I should check?

By the way, I am thoroughly enjoying this product and I also appreciate the questions and comments of all the members in the forum.

Bye,
Hilton.
 
Upvote 0

Hilton

Active Member
Licensed User
Longtime User
Hi Erel,
you said:
"I've uploaded a working APK to the GoogleMap thread. I recommend you to try it first."

Forgive me, I do not seem to be able to find the working APK you kindly uploaded, where exactly should I look?

Hilton.
 
Upvote 0

Hilton

Active Member
Licensed User
Longtime User
Hi Folks,

Thank you for your patience! It is now working simply because I am now using the correct service api, I should have chosen Google Maps Android etc but I chose the one without Android. Kind of red face time.

Thanks again,
Hilton.
 
Upvote 0

Ratna Fang

Member
Licensed User
Longtime User
hi erel,

i'm using 3.5 and i have no idea i found this problem.
i created several projects using google maps and no problems until today i found this when compiling.

i checked the library folder (different library folder with b4a), no change. then i tried to paste google play jar (2 files from sdk).


i uninstalled also b4a then install again, but i got this error again. i can't create new project with google map lib. the funny thing is my previous projects with google map are fine. they can be opened, modify and compile without any errors.

i can compile the project successfully if i remove gmap.AnimateCamera(cp) for new project. something wrong? or i need to upgrade the google play lib with the latest one?

here is the error message:
B4X:
Parsing code.                          0.04
Compiling code.                        0.23
Compiling layouts code.                0.01
Generating R file.                      0.41
Compiling generated Java code.          Error
B4A line: 30
gmap.AnimateCamera(cp)
javac 1.7.0_03
src\com\bengkeldroid\rasikareport\main.java:336: error: package com.google.android.gms.maps.model does not exist
mostCurrent._gmap.AnimateCamera((com.google.android.gms.maps.model.CameraPosition)(_cp.getObject()));
                                                                  ^
1 error

any suggestion? or i should move the extra lib folder outside the c:\program files (x86)

---UPDATE---
erel, it's getting strange for me. i can compile the new project but....i have to add admob or airpush lib. when i load one of of them and modify the manifest accordingly, the project is compiled successfully.

so i have to use adnetwork lib for playing with google map. well, at least that's the only option left for me. for now
 

Attachments

  • Image 1.jpg
    234.7 KB · Views: 158
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…