GPS Example

techpro

Member
Licensed User
Longtime User
Hi. I am a B4A newbie. I have just purchased a licence and run a couple of the tutorial applications.

I'm interested in using the GPS so I opened the GPSExample in the IDE. But when I try to run it I get:

Error parsing program.
Error description: Unknown type: webviewextras
Are you missing a library reference?
Occurred on line: 158
Dim MapViewerExtra As WebViewExtras

I have established that WebViewExtras is a user supplied library, I have downloaded it from the forum and copied the .jar and .xml file to a folder called Additional which I have specified for Additional Libraries in the paths configuration. I even tried copying the files to the main libraries folder but it didn't make any difference.

I looked at the WebViewExtras demo and I can't see how that works and the GPS example doesn't.

There is obviously something basic that I have missed (pun unintentional). Can someone put me out of my misery?
 

Mahares

Expert
Licensed User
Longtime User
I assume you use WebViewExtras 1.3. In the IDE, on the right hand side lower corner pane (panel) there are tabs: Mudules, files,logs, Libs. Select Libs and right click to refresh. Then, you will see the WebViewExtras lib listed among the list. Put a check mark in the box next to it. That is all
 
Upvote 0

techpro

Member
Licensed User
Longtime User
Now I've hit the same problem with another library. This time I can't find where to download it from. The error is:

Error description: Unknown type: filedialog
Are you missing a library reference?
Occurred on line: 57
Dim Dialog1 As FileDialog

If it is buried somewhere in the forum search can't find it. I have discovered a wiki that lists loads of libraries in no particular order but I can't find FileDialog there either.

This is turning into rather an unsatisfactory new user experience. It is very disappointing when demo apps include components that are not included. Even more, is there a way to find out all the dependencies of an app without having to discover them by error messages?

Is there a place where I can search for a library by name and then download it?
 
Last edited:
Upvote 0

techpro

Member
Licensed User
Longtime User
Okay. I've discovered now I need the Dialogs library. I have even found the documentation for it thanks to Google. But there is no link to the zip file download from the documentation. This is getting frustrating.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
A 'hacky' way to establish which libraries a project requires is to open the project's .b4a file in a text editor such as Windows Notepad.

The .b4a file starts with some configuration data and is followed by the source code for the project's Main Activity.
In that configuration data you'll be able to find lines such as:

B4X:
Library1=abwifi
Library2=ahpreferenceactivity
Library3=ahquickaction
Library4=core
Library5=dialogs
Library6=geograph
Library7=gps
Library8=gpstoosgb
Library9=livewallpaper
Library10=osmdroid
Library11=sql
Library12=stringutils
Library13=tabhostextras
Library14=webviewextras

Not perfect but at least you can see which libraries are required - just be sure not to make any changes to the .b4a file otherwise the project may then be corrupted and fail to open.

Martin.
 
Upvote 0
Top