Android Question File name or extension too long

FrankBerra

Active Member
Licensed User
Longtime User
Hello!
I abandoned for some months my project and now i am back to develop it again.
- I installed again SDK and ver. 29 of android platform
- Updated B4A to version 10.2
- Updated everything suggested by SDK manager
- Started to compile my project WITHOUT changing any line of code and now before compiling it says "File name or extension too long"
- I tryied to move the folder of the project to C:\MyProject but without any success.
(Until few months ago i never experienced any similar problem)

Is there any known fix for this?

Thank you in advance,
Frank
 

FrankBerra

Active Member
Licensed User
Longtime User
Ok so i followed your suggestion and this is what i have done:
- Deleted folder c:\Android
- Deleted folder c:\Java
- Downloaded and unpacked the zip files as suggested in the instructions
- Downloaded B4A and installed again

(This time i have NOT opened and NOT updated anything related to SDK manager)

I opened B4A IDE, opened the project and started compilation: the problems is still present.

What i have missed in the instructions?
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Because you original program was created with an older SDK version I think that you get some error message like

The recommended value for android: targetSdkVersion is 29 or higher (manifest editor). (warning # 31)
Use the standard theme.
Remove SetApplicationAttribute (android: theme, "" @Android: style / Theme.Holo "") from manifest editor. "(Warning # 28)


Now you could try to "update" your old code by opening of a second B4A IDE and copy all the old program code to the second empty version to "rebuild" your program. After resolving all program (warning) error message(s), did still get the "File name or extension too long" error message?
 
Upvote 0

FrankBerra

Active Member
Licensed User
Longtime User
I don't have these warnings you are talking about...

Updating the program in the way you are suggesting means for me copy-paste codes for over 30 modules and recreate dozens of designs...sorry but it looks extremly complicate to do.

Is it possible to read the logs to understand what is "too long"?
 
Last edited:
Upvote 0

FrankBerra

Active Member
Licensed User
Longtime User
Are you talking about this?
B4X:
B4A Version: 10.2
Java Version: 11
Parsing code.    (0.61s)
Building folders structure.    (0.11s)
Compiling code.    (0.62s)
Compiling layouts code.    (0.57s)
Organizing libraries.    (0.03s)
    (AndroidX SDK)
Generating R file.    (0.53s)
Compiling generated Java code.    Error
Nome del file o estensione troppo lunga
Last sentence says: "File name or extension too long"
 
Upvote 0

FrankBerra

Active Member
Licensed User
Longtime User
No it doesn't.
Now after some tests i discovered that it generates the error only with one of the 2 conditional compile options.

The differences between one to other are "minimal" like:
B4X:
#If EVER
    #ApplicationLabel: Ever
#end if

#If POLKA
    #ApplicationLabel: Ever Beta
#end if

or
B4X:
#IF POLKA
Banner.Initialize2("Banner", "ca-app-pub-XXX", Banner.SIZE_SMART_BANNER)
#End If
               
#If EVER
Banner.Initialize2("Banner", "ca-app-pub-XXY", Banner.SIZE_SMART_BANNER)
#End If

and so on....
 
Last edited:
Upvote 0

FrankBerra

Active Member
Licensed User
Longtime User
The problem is somewhere else. If you like you can send me the project and I'll try here.
Thank you for your help, but before sending the whole project to you, i just want to ask you if it can be sufficient take a look to it remotely with, let say, Teamviewer on my computer.

I tryied everything from enabling long paths on Win10, to moving project to root folder, and also trying to install B4A on linux via Wine.
Everything failed.

Now i would like to try to compile the project directly under linux (that should not be affected by long-paths error): what are the command lines to use to compile the project?
 
Upvote 0
Top