Android Question [SOLVED] [B4X] [B4XPages] Barcode Reader in an old B4A project

ThePuiu

Active Member
Licensed User
Longtime User
I'm trying to use the 1D scanning facility in an older project. The example offered by Erel works in the B4X project, but I can't manage to carry it in my project ...
What I did:
1. add #AdditionalJar: com.google.android.gms:play-services-vision in Main file
2. add
AddApplicationText(<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode,,face" />
) in manifest file
3. included used library
4. add
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region in my activity


At compilation I receive the following error message:
B4A Version: 11.00
Parsing code. (0.29s)
Java Version: 11
Building folders structure. (0.04s)
Running custom action. Error
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Tuesday, November 2, 2021 5:53:13 PM
Source : C:\__SURSE\__ANDR~1\Shared Files\
Dest : C:\__SURSE\__ANDR~1\ISORIH~1\Files\
Files : *.*

Options : *.* /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
2021/11/02 17:53:13 ERROR 2 (0x00000002) Accessing Source Directory C:\__SURSE\__ANDR~1\Shared Files\
The system cannot find the file specified.

If i Ctrl+click on link, i receive the error:
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------
Started : Tuesday, November 2, 2021 5:53:48 PM
Source : C:\__SURSE\__ANDR~1\Shared Files\
Dest : C:\__SURSE\__ANDR~1\ISORIH~1\Files\
Files : *.*

Options : *.* /DCOPY:DA /COPY:DAT /R:1000000 /W:30
------------------------------------------------------------------------------
2021/11/02 17:53:48 ERROR 2 (0x00000002) Accessing Source Directory C:\__SURSE\__ANDR~1\Shared Files\
The system cannot find the file specified.
Completed. Exit code: 16

What should I do?
Thank you!
 

ThePuiu

Active Member
Licensed User
Longtime User
it seems that point 4 should not have been added to the project! After I removed that piece of code, the application works!
 
Upvote 0
Top