Android Question A simple question from a newcomer

Mr.Marc

Member
Licensed User
Hi,
I just installed B4A and this is exactly the type of software I been looking for. I tried android studio a couple of days ago and I uninstalled after 30 minutes because I did not understand anything. I did not like the software at all. It was way to cluttered, too low level and too detailed. I was expecting more from google.

When I tried B4A instantly fell in love because I have done programming in VBA previously and the commands looks similar. Hence, I might actually have 50% chance of creating an android app. Yippee. Compared to a 0% chance with android studio.

However, the first app (your provided example MyFirstProgram.b4a) I tried to run on my computer and displayed on my android phone gives med an error message:

Could not find file 'C:\Users\david\AppData\Local\Temp\Temp3_B4X programming guide.zip\SourceCode\MyFirstProgram\B4A\Files\main.bal'.

I don't understand why B4A looks in my temp folder for the file when I have the file in a folder on my desktop. I tried to find the place where I can change the path but no luck. Can anyone help me please?
 

Mr.Marc

Member
Licensed User
I think I managed to solve the problem . I had to copy all the code over to a new file and save it on the desktop and then import the main.bal file. I ran the app on my android phone and everything works as expected. Before I got an error message and a red dot on Sub Activity_Create which loads Layout ("Main") on line 30. Something must have become corrupt or some reference must have been broken. I still however can display the app on the android emulator on my computer (no device found) only on my android phone
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

klaus

Expert
Licensed User
Longtime User
...when I have the file in a folder on my desktop
Where did you copy the unziped files for the guides?
I would suggest you to copy the guide zip file somewhere else on the C: or D: drive not in the C:\Users folder.

Do you see this in the IDE?

upload_2017-10-27_9-58-33.png


Click on the red dot to remove it.
The red dot means a breakpoint which shouldn't be there.
I forgot to remove it during testing when I wrote the guide.
 
Upvote 0

Mr.Marc

Member
Licensed User
Thank you both for your excellent help. The guide files were first in my download folder for the edge browser and then I copied them to my desktop and extracted them, Yes, I had a break point there (a red dot). Since I am new to B4A I had to spend a couple of hours trying to figure out what was wrong lol. I wasn't aware that you could just click on the break point to remove it. Usually in other languages when you get an error it means that you have done something wrong in the code and program will not run until you fix it.

Now the original file works as expected and I can delete the new file I copied everything over to. I still however can't launch the new android emulator (B4A AVDManager) from within B4A (tools - run AVD manager) because the path to the new file in B4A is not updated. This is however a miner problem I can live with because I have created a desktop shortcut to the B4A AVD Manager so I can launch the program externally from B4A.
 
Upvote 0
Top