Android Question Problem/bug? using B4ABuilder 9.00

JackKirk

Well-Known Member
Licensed User
I have just installed B4A 9.00 on Java 10.0.1 and am getting:
D:\XXXX\B4X\Customer - Android\YYYY>call "C:\Program Files (x86)\Anywhere Software\Basic4android\B4ABuilder" -BaseFolder="D:\XXXX\B4X\Customer - Android\YYYY\Obfuscation" -task=Build -obfuscate=True -configuration=customer
B4ABuilder v9.00
BaseFolder: D:\XXXX\B4X\Customer - Android\YYYY\Obfuscation
ProjectFile: Customer.b4a
System.IO.FileNotFoundException: Could not find file 'D:\XXXX\B4X\Customer - Android\YYYY\Customer.b4a'.
File name: 'D:\XXXX\B4X\Customer - Android\YYYY\Customer.b4a'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at df.p(FileMode A_0, FileAccess A_1)
at ce.l()
at ce.j(String[] A_0)
at ce.m(String[] A_0)
Could not find file 'D:\XXXX\B4X\Customer - Android\YYYY\Customer.b4a'.
when trying to use B4ABuilder.

Very similar to B4J problem:

https://www.b4x.com/android/forum/threads/problem-bug-using-b4jbuilder-7-31.104280/#post-653641
 

JackKirk

Well-Known Member
Licensed User
Does same thing on B4A 8.80 but works on B4A 8.50
 

JackKirk

Well-Known Member
Licensed User
Follow the installation instructions: https://www.b4x.com/b4a.html
OK:
I then ran my .bat file that does compiles and get:
D:\XXXX\B4X\Customer - Android\YYYY>call "C:\Program Files (x86)\Anywhere Software\Basic4android\B4ABuilder" -BaseFolder="D:\XXXX\B4X\Customer - Android\YYYY\Obfuscation" -task=Build -obfuscate=True -configuration=customer
B4ABuilder v9.00
BaseFolder: D:\XXXX\B4X\Customer - Android\YYYY\Obfuscation
ProjectFile: Customer.b4a
System.IO.FileNotFoundException: Could not find file 'D:\XXXX\B4X\Customer - Android\YYYY\Customer.b4a'.
File name: 'D:\XXXX\B4X\Customer - Android\YYYY\Customer.b4a'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at df.p(FileMode A_0, FileAccess A_1)
at ce.l()
at ce.j(String[] A_0)
at ce.m(String[] A_0)
Could not find file 'D:\XXXX\B4X\Customer - Android\YYYY\Customer.b4a'.
Short of it: problem is still there, B4ABuilder is echoing:

BaseFolder: D:\XXXX\B4X\Customer - Android\YYYY\Obfuscation

but then saying:

Could not find file 'D:\XXXX\B4X\Customer - Android\YYYY\Customer.b4a'

somewhere between these 2 events B4ABuilder is losing the Obfuscation folder.
 
Last edited:

thetahsk

Active Member
Licensed User
Perhaps a path or a white space problem.
What happens if you remove all white spaces from path and filenames ?
 

JackKirk

Well-Known Member
Licensed User
What happens if you run it from the project folder without the BaseFolder parameter?
I do not understand exactly what you mean by this, my current command is:

D:\XXXX\B4X\Customer - Android\YYYY>call "C:\Program Files (x86)\Anywhere Software\Basic4android\B4ABuilder" -BaseFolder="D:\XXXX\B4X\Customer - Android\YYYY\Obfuscation" -task=Build -obfuscate=True -configuration=customer

how are you suggesting I modify it?

I suspect you may be missing the point - it appears to me that it has nothing to do with obfuscation - B4ABuilder internally is dropping the last nested folder.

What if you try a similar command with multiple nested folders in the BaseFolder parameter and see if you get a similar result?
Perhaps a path or a white space problem.
What happens if you remove all white spaces from path and filenames ?
I have been running the .bat file of which the above forms a part for several years and through multiple releases of B4A.

This problem was introduced at B4A v8.80 (which I never used) and perpetuated in v9.00 - v8.50 works fine.

There is an almost identical problem with B4J v7.00 and v7.31 - v6.51 works fine.
 
Last edited:

thetahsk

Active Member
Licensed User
I do not understand exactly what you mean by this, my current command is:

D:\XXXX\B4X\Customer - Android\YYYY>call "C:\Program Files (x86)\Anywhere Software\Basic4android\B4ABuilder" -BaseFolder="D:\XXXX\B4X\Customer - Android\YYYY\Obfuscation" -task=Build -obfuscate=True -configuration=customer
I mean the blanks in your path "D:\XXXX\B4X\Customer - Android\YYYY" .
 

JackKirk

Well-Known Member
Licensed User
thetahsk,

I was responding to Erel's comment:
What happens if you run it from the project folder without the BaseFolder parameter?
not yours.
 

Erel

Administrator
Staff member
Licensed User
D:\XXXX\B4X\Customer - Android\YYYY>call "C:\Program Files (x86)\Anywhere Software\Basic4android\B4ABuilder" -BaseFolder="D:\XXXX\B4X\Customer - Android\YYYY\Obfuscation" -task=Build -obfuscate=True -configuration=customer
Try this:
B4X:
cd Obfuscation
call "C:\Program Files (x86)\Anywhere Software\Basic4android\B4ABuilder" -task=Build -obfuscate=True -configuration=customer
 

JackKirk

Well-Known Member
Licensed User
Try this:
B4X:
cd Obfuscation
call "C:\Program Files (x86)\Anywhere Software\Basic4android\B4ABuilder" -task=Build -obfuscate=True -configuration=customer
OK that workaround works.

You now obviously realise the dimensions of the bug - when will it be fixed (particularly in B4J)?

Thanks...
 

JackKirk

Well-Known Member
Licensed User
I cannot say. However there is a very simple workaround which I recommend you to use for now.
The workaround is simple, however the implementation is a bit of a problem when your project involves 17 B4J apps each one having a compiler .bat file that use B4JBuilder twice - all of which have a master on my desktop and a copy on an AWS EC2 instance and/or a headless legless PC in the bush.

Far easier to wait until it is fixed.
 
Top