Android Question Starter Service Won't Add to a Project

Andris

Active Member
Licensed User
Longtime User
I've seen another thread on this subject, with no clear answer. The problem is one in which a Starter Service can be added to some projects but not to others.

I have an older project which I've been editing, debugging, and compiled in release mode in the latest version of B4A, with no problems. I then needed to add a Starter Service, so I did Project > Add Existing Modules and copied a Starter Service module from another project. I was able to compile and run the app. However, after closing the B4A window and then later reloading the project, the Starter Service was missing from the module tab at the top, as well as the dropdown list. But, Starter.bas was present in the project folder.

I then checked to see if I could add the same Starter.bas module to another project. After saving and closing and reopening, it remained in the project just like it should.

So why would Starter Service refuse to be added to the first project? Is this some funky bug in how B4A handles its list of modules? I could start a brand new project and then migrate all my modules over, but maybe there's a simpler solution?
 
Last edited:

Computersmith64

Well-Known Member
Licensed User
Longtime User
Going back through several of my projects & looking at the Starter.bas file in Notepad++, I can see that there are different versions of Starter. I wonder if that has anything to do with it? I guess a workaround would be to create a new Starter service in the project, then copy & paste the code from the one you are trying to import & see if it saves correctly. If that works ok, then maybe it is something to do with the versioning of Starter (although you say the same file saves ok in a different project, so maybe not).

- Colin.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Actually, further to my other reply I can see that the project files (the .B4A files) also have different versions - so perhaps they have to be compatible. For example, in one of my projects the Starter is v7.03 & the .B4A is v7.8 & in another project the Starter is v7.1 & the .B4A is v8...

- Colin.
 
Upvote 0

Andris

Active Member
Licensed User
Longtime User
Try this: Add New Module - name the module Starter. Does it work?
I did this and got the message "There is already a module with this name." So I removed the existing Starter.bas from the project folder, did a Clean Project, and tried again. Same message.
 
Upvote 0

Andris

Active Member
Licensed User
Longtime User
I see the starter service in the modules list:

The IDE opens up to 10 modules when a project is loaded. You don't need to open all modules. They are there.

Just click on Ctrl + E and start to write the module name to navigate to open it.

Thanks Erel. Feel kind of stupid now :oops:. The dropdown list from the modules tab line at the top doesn't show Starter though, and that's what I was focused on rather than the Module List. Thanks for bringing me back to sanity lol!
 
Upvote 0
Top