Android Question I can't compile the GPSExample

Thomas Walker

Member
Licensed User
Longtime User
When I try to compile the GPSExample I receive the following error message:

Compiling generated Java code. Error
javac 1.7.0_51
src\B4A\GPSExample\main.java:372: error: package uk.co.martinpearman.b4a.webviewextras does not exist
public uk.co.martinpearman.b4a.webviewextras.WebViewExtras _mapviewerextra = null;

The program Basic4Android shows the library WebViewExtras (V1.40) under the tab "Libs".
The files WebViewExtras.jar and WebViewExtras.xml lying in the "Libraries"-directory.
Why the compiler think, that the packages does not exist ?
What's the reason for the error ?
 

DonManfred

Expert
Licensed User
Longtime User
Which GPSexample are you using? Url please...

The GPSexample i knew from here does not use an webview or webviewextras...

Seems you are using some other example... Maybe a GoogleMapsExample?

If you post your code it would be MUCH EASIER to help.

Export as zip and upload it here...
 
Upvote 0

Thomas Walker

Member
Licensed User
Longtime User
Hallo DonManfred,
the source code GPSExample was in the Zipfile UserGuide.zip
To compile the example it is necessary to install several libraries: ByteConverter,ScrollView2D,Dialogs,WebViewExtras
I've uploaded the source code.
Thank you for your help.

Thomas
 

Attachments

  • GPSExample.zip
    131 KB · Views: 296
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I´ve downloaded your project, extracted the files, opened the b4a and do a compile... No Compile-Error

What exactly do you want to do?

Maybe a smaller example would be better to start with... But, anyway... The app runs here.. The map doesn´t work but that can be due to no GPS-signal here in my rooms...
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Here are the Libs in use by your Code

byteconverter,1.10
core,3.21
dialogs,2.92
gps,1.20
phone,2.20
randomaccessfile,1.65
scrollview2d, 1.10
webviewextras, 1.40

The versions after the comma are the ones i have installed here.

PS: BTW: Welcome in the Basic4Android Community!
 
Upvote 0

Thomas Walker

Member
Licensed User
Longtime User
I've still the same error:

javac 1.7.0_51
src\B4A\GPSExample\main.java:362: error: package uk.co.martinpearman.b4a.webviewextras does not exist
public uk.co.martinpearman.b4a.webviewextras.WebViewExtras _mapviewerextra = null;

Is the problem perhaps the version of the WebViewExtras library (V1.40) ?
Or the version of the Java-Compiler (1.7.0_51) ?
I don't unterstand the reason of the error.
I only would to learn about GPS functionalities.
 
Upvote 0

Thomas Walker

Member
Licensed User
Longtime User
No, the webviewextras library is in the normal lib folder under the Basic4Android programm.

Now, I have try to compile the WebViewExtrasDemo und receive a similar error:

src\uk\co\martinpearman\b4a\webviewextras\demo\main.java:267: error: cannot find symbol
public uk.co.martinpearman.b4a.webviewextras.WebViewExtras _mywebviewextras = null;
^
symbol: class WebViewExtras
location: package uk.co.martinpearman.b4a.webviewextras
1 error


I think, that my Java compiler has a problem with the WebViewExtras library.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I tested it too and no problem with compiling (WebViewExtras V1.40).
How did you set the Additional libraries folder in the IDE (chpater 14.7.2 Additional libraries folder in the Beginner's Guide) ?
You should set a folder there and add all additional library files in this folder.
Do you see the WebViewExtras library in the Libs Tab in the IDE, and if yes did you check it ?
 
Upvote 0

Thomas Walker

Member
Licensed User
Longtime User
Hallo DonManfred, your suggestion was correct.
The WebViewExtras library must be located in a direction without white spaces.
First my path was C:\Program Files\Anywhere Software\Basic4android\Libraries.
Later I've taken the WebViewExtras library in an additional path: C:\Basic4Android\Libraries.
And now the compiler shows no more errors.
I could't believe that white spaces the cause of my problems.

Thanks for all.
Thomas
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Yea, your said it that´s in the normal folder. And i should thought about that b4a is normally in such a folder. But i only have in mind my own installation here... (D:\Basic4Adroid\Libs\) so i did not ask about the Path of your b4a-installation...

Great that you find out now and it works now. :)
 
Upvote 0
Top