Android Question GMap tutorial throws up error.

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All

I have updated an existing App following Erel's "Android Tutorial Google Maps". In compiling I get this warning:
"View 'mFragment' was added with the designer. You should not initialize it. (warning #20)"

This is the source of the warning, why?
Is this really a problem or can I "Ignore" it?

B4X:
Sub Globals
   Private mFragment As MapFragment

Regards Roger
 

DonManfred

Expert
Licensed User
Longtime User
Is this really a problem or can I "Ignore" it?
It is a Problem.

As you are not providing enough informations we can not help here.

DO NOT Initialize a View which you load in a Layout.

POST all relevant code. Best upload a project so we could see the issue.
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
Thanks DonManfred,

Be assured, I am NOT initializing the map fragment. I was hoping someone had already seen this and solved it. [We live in hope]
If it is unknown it is indeed a problem.
The project is to big to upload to the forum, when I get a chance I will upload to DropBox and post a link as soon as I can.


Regards Roger
 
Upvote 0

Roger Daley

Well-Known Member
Licensed User
Longtime User
DonManfred,

As I wrote in #3, in lieu of uploading the Zip due to the size limits of uploads on the forum here is a download link.
https://www.dropbox.com/s/fdp0ir1vbebykyd/ABTwip.zip?dl=0

1. This is a Works In Progress and currently is not working even if I ignore the warning. [I am yet look at these issues.]
2. The API key is a dummy for security
3. Creating a small project is not feasible as there is no certainty that the problem would be recreated, I would only create what Erel showed in the tutorial.

Thanks in advance.

Regards Roger
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Be assured, I am NOT initializing the map fragment.
This is from your Activity Create sub.

B4X:
mFragment.Initialize("Map", MapPanel)
You ARE Initializing it.
GoogleMap is a Customview which you should load from a Layout. Create a layout for the googlemap fragment and load this layout.

note that i removed the ttf from the zip so that the size is ok to upload. Add your ttf to this example.
 

Attachments

  • antennanew.zip
    149 KB · Views: 138
Upvote 0
Top