B4A project and file locations

pelican2

Member
Licensed User
Longtime User
B4A newbie but not totally green....

I created a simple project this morning and saved it to a specific folder... later I changed the package name, now it won't compile, I get this error text :

Compiling code. 0.17
Compiling layouts code. 0.02
Generating R file. 0.31
Compiling generated Java code. Error
javac 1.6.0_32
javac: file not found: src\monotrack01\b4a\main.java
Usage: javac <options> <source files>
use -help for a list of possible options

I figured the name change was the cause so I went looking for the files to manually change them ( B4A does not seem to have that facility and does not have a SAVE AS facility ) but I could not find them in the very folder where B4A does find them. ( folder shows up empty in Windows Explorer... and "hidden files" display is enabled for that folder )

So... questions...

1. What exactly is the item in menu "Project/Package Name"... is it a folder name or a filename ? ( what extension ? ) Or something else ?

2. Why can't I see the files in Windows Explorer but they show up in B4A ?

3. How do I get out of this situation ( other than trashing the project and re-creating it all manually with new names )

I did a 100% cold reboot of the computer and B4A was still able to find the project and load the code... but... "how do it know ?"

Would be nice if the B4A file dialog boxes were allowed to show ALL FILES... they presently are limited only to specific extensions... if the files were visible, they could be renamed ( or copied or deleted ) there with a right click.
 

pelican2

Member
Licensed User
Longtime User
Well THAT was painful... and unnecessary... apparently the Java compiler can't access certain folders ( like PROGRAM FILES ) and the resulting error messages give no clue as to the actual cause. I won't explain the missing files in Windows Explorer. This was the first project I stored inside the PROGRAM FILES / Anywhere Software folder.

Would be nice if this was mentioned somewhere prominently in the B4A docs.
 
Upvote 0

pelican2

Member
Licensed User
Longtime User
I now vaguely recall ( from what little Java I've done ) that compiler paths and filenames cannot contain "embedded whitespace"... as "Program Files" clearly does...
 
Upvote 0

johneboy

Member
Licensed User
Longtime User
This is my first post to the forum. I think I have searched for a solution but there is a lot to search and a lot to learn.
I purchased b4a standard today and have been trying to get usbserial v2.4 to work. I am using Windows 8 64bit. I installed B4A and Android SDK into their own folders under C: which do not have spaces. I then created a folder to hold my projects under My Documents. I got MyFirstProject to work. I note that b4a has a subfolder called Libraries which I take to be the standard internal libraries folder referred to in Configure Paths. I created another folder in My Documents to hold additional libraries and pointed Configure Paths to point to this folder. I then put usbserial .jar and .xml files there. I ticked the box for USB serial in Referenced Libraries and the references in the IDE then appear to be valid.
When I compile I get
"Path contains illegal characters. Please install Basic4android in a path without spaces (this issue is related to Android SDK)."
As both b4a and android sdk are in paths that do not have spaces, is the error actually to do with having the additional library under My Documents? If so, it would be helpful to make that clear in the instructions. Is there a problem with putting additional library files in the b4a/libraries folder?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
is the error actually to do with having the additional library under My Documents?
yes. this folder should not contain spaces in the path. Better put it in some other place.
 
Upvote 0
Top