Android Question File options error when running but no understandable details in neither b4a log or b4a command line log

vikingivesterled

Member
Licensed User
My first attempt at using GoogleBilling instead of InAppBilling3 ended in this error while compiling(debug run):

B4A Version: 11.00
Parsing code. (0.06s)
Java Version: 8
Building folders structure. (5.35s)
Compiling code. (1.94s)
Compiling layouts code. (0.30s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources Error
error: files given but --dir specified.
aapt2 compile [options] -o arg files...
Options:
-o arg Output path
--dir arg Directory to scan for resources
(and all the other file options)


I also did another couple of changes like removing ads and firebase, since tracking has become such a no no.
However I can't find the reason for this error and reinserting stuff one by one, or taking them out likewise have not given a different result (this was a running program).
I need to see exactly the command it is trying to do.
I tried starting b4a from the command line with the -log option and got some steps into the log.txt file:

Build modules tree: 0
B4A version: 11.00
.Net version: 4.0.30319.42000
Ini folder: C:\Users\xxxxx\AppData\Roaming\Anywhere Software\Basic4android
UDP server: 192.168.x.xx, broadcast: 192.168.2.255
Global Java version: 8
Gui: 1002
Build modules tree: 0
Gui: 593
CompilingManager: not ready
Build modules tree: 83
Build modules tree: 1
Gui: 1011
Build modules tree: 0
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
Gui: 573
Compilation task: 679.7293
Compilation task: 309.6891
Gui: 374
Compilation task: 9265.0553
Gui: 626

But it don't give much details of exactly what command/file failed.
Can someone provide some detail on more command line start options or other ways of getting more details?
 
Last edited:

vikingivesterled

Member
Licensed User
Deleting Android SDK and donloading it and the recources unzipping them with 7-zip
(also reinstalled the last b4a upgrade and rebooted both before (to ensure all the SDK files where deleted berfore reinstalling) and after)
gave this result:

B4A Version: 11.00
Parsing code. (0.04s)
Java Version: 8
Building folders structure. (4.93s)
Compiling code. (1.91s)
Compiling layouts code. (0.32s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources Error
error: files given but --dir specified.
aapt2 compile [options] -o arg files...
Options:
-o arg Output path
--dir arg Directory to scan for resources
--zip arg Zip file containing the res directory to scan for resources
--output-text-symbols arg Generates a text file containing the resource symbols in the
specified file
--pseudo-localize Generate resources for pseudo-locales (en-XA and ar-XB)
--no-crunch Disables PNG processing
--legacy Treat errors that used to be valid in AAPT as warnings
--preserve-visibility-of-styleables If specified, apply the same visibility rules for
styleables as are used for all other resources.
Otherwise, all stylesables will be made public.
--visibility arg Sets the visibility of the compiled resources to the specified
level. Accepted levels: public, private, default
-v Enables verbose logging
--trace-folder arg Generate systrace json trace fragment to specified folder.
-h Displays this help menu

log:

Build modules tree: 0
B4A version: 11.00
.Net version: 4.0.30319.42000
Ini folder: C:\Users\Martin\AppData\Roaming\Anywhere Software\Basic4android
UDP server: 192.168.2.61, broadcast: 192.168.2.255
Global Java version: 8
Gui: 1005
Build modules tree: 0
Gui: 656
Build modules tree: 137
Build modules tree: 1
CompilingManager: not ready
Gui: 1000
Build modules tree: 0
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
*** no reuse ***
Gui: 527
Compilation task: 568.3578

Bridge: Trying to connect to port: 6789, attempts left: 3000
Connected!
Installed designer version: 31
Gui: 334
Compilation task: 8858.5965
Gui: 119
Gui: 375
Gui: 163
Gui: 467
Gui: 456
Compilation task: 8835.6521
 
Upvote 0

vikingivesterled

Member
Licensed User
No #AdditionalRes
The BillingExample attached to the billing post compiles fine.

I do have a link to a folder with many additional libraries in the path setup.
Libraries included in the non compiling program:
Accessibility
Core
GooglePlayBilling
GPS
LocationManager
OkHttpUtils2
Phone
Reflection
RunTimePermissions
StringUtils

This is the manifest:

AddManifestText(
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
'SetApplicationAttribute(android:requestLegacyExternalStorage, true)
SetManifestAttribute(android:installLocation, auto)
CreateResourceFromFile(Macro, GooglePlayBilling.GooglePlayBilling)

'************ Google Play Services Base ************
AddApplicationText(
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="false"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
)
'************ Google Play Services Base (end) ************

'************ FileProvider ************
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
AddApplicationText(
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
)
CreateResource(xml, provider_paths,
<files-path name="name" path="shared" />
)
'************ FileProvider (end) ************


'******Features and Permissions************
AddPermission(android.permission.ACCESS_FINE_LOCATION) ' Allows an app to access precise location from location sources such as GPS, cell towers, and Wi-Fi.
AddPermission(android.permission.MODIFY_AUDIO_SETTINGS) ' Allows an application to modify global audio settings.
AddPermission(android.permission.INTERNET) ' Allows applications to open network sockets.
AddPermission(android.permission.FOREGROUND_SERVICE)
'******Features and Permissions (end)************

AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.location" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.location.gps" android:required="false" />)

AddPermission(android.permission.FOREGROUND_SERVICE)
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Problem solved
I had a space in the Build Configurations Package name.

Thanks for sharing this solution so we are able to face another possible failure point in our apps.
 
Upvote 0
Top