Android Question App that ran in debug on old B4A wont run on current version

Steve Beer

Member
Licensed User
Longtime User
LogA.JPG
I have had B4A for over 2 years, and wrote an app or my Home automation. I have not used B4A since, but have upgraded each time a new version has been released. My PC has also been upgraded from Win7 to Win10. I now need to update my App, but it will not run to the virtual device in debug or release. I have tried making a new simplified app ( all it does is load a single layout which contains 1 Label), and that will not run either. I originally used API level 14 for both B4A and AVD, but I have also tried level 23. It compiles and installs to the AVD, but then fails. The log suggests that it cannot find the Main Activity.
I have attached a screen print of the log.
Any suggestions would be appreciated.
 

KMatle

Expert
Licensed User
Longtime User
Could you try on a real Android device? Hard to say why the virtual device does not start the app. On the other hand you could change the package name (maybe it interferes with an older one). "Not found" means "not found", maybe some path isn't quite set in the virtual device?
 
Upvote 0

Steve Beer

Member
Licensed User
Longtime User
Hi, Thanks for your quick reply, I have just tried on my phone using the B4A Bridge, and get the same result on the phone, a message saying "Unfortunately B4A Example has stopped". This time though there is nothing in the log about the execution. See below for all that is shown in the log. Is this because I am using the bridge ?

Do I need to uninstall everything (B4A and android) and then reinstall?.

LogB.JPG
 
Upvote 0

Steve Beer

Member
Licensed User
Longtime User
Assuming the value shows on the Phone as Settings / Security / Unknown Sources (allow installation of apps from unknown sources), it is turned on.
I have shut down B4A and restarted, and now there is nothing showing in the B4A Log when I run (and compile) the app in debug. The compile screen spins through the stages to completing, ending with installing to device and then complete.

On the Android device, a message comes up asking if it is ok to install the application, which I confirm, and then get an installed message, with buttons for Done and Open, where I am pressing Open. A screen, possibly the apps activity pops up for a fraction of a second then disappears again, followed by the "Unfortunately, myappname has stopped"

I get the same results if I compile in Release mode

I have as suggested changed both the Package Name and Application Label, but get the same message (appname to match my changed name)on the android device.

It seems strange that I am getting the same message on both the AVD and the real device via the bridge.
 
Upvote 0

Steve Beer

Member
Licensed User
Longtime User
Thanks for the suggestion Erel, but it made no difference I'm afraid.

I have tried uninstalling B4A, Android SDK/AVD, Java Developer, and reinstalling with no luck, but as the original settings were still showing after reinstall, I suspect that the uninstall does not remove all registry entries.

I suspect my problem is that one of the updates, or even the upgrade from Windows 7 to Windows 10 has corrupted a setting somewhere that is not getting reset by a reinstall.

I have just uninstalled v6.3 and reinstalled v5.0 which definitely did work, and even that will not run the ultra simple test app. (1 layout with 1 label, and 1 line of code to Load the layout). I added a second line of code (plus declaration) to change the label text just in case it wanted the label defined to the program.

I have tried running the installed apk on my phone, without the bridge connected, and it fails the same way.

I have attached a zip file containing the simple "Project" with the compiled debug apk, and was wondering if someone could see if the apk runs for them as it stands, without recompiling it, so we can see if the apk is getting compiled incorrectly.

I am not sure where to go from here :(
 

Attachments

  • MiniTestOct2016.zip
    505.5 KB · Views: 229
Upvote 0

Steve Beer

Member
Licensed User
Longtime User
Thanks Klaus, as you have specified your B4A Config, did you recompile the APK or just install the APK in the zip to the device.
I have no doubt B4A works, it is just trying to work out where I have a config issue, and as the installed APK fails on my phone when it is not even attached to B4A I was wondering if the APK had a problem when I compiled it.
Looks like I am going to have to get another PC for B4A use as there doesn't seem any way out of this issue :(
 
Upvote 0

Steve Beer

Member
Licensed User
Longtime User
The project is stored on my NAS drive, and it was the project folder from there that I zipped and posted in yesterdays post (MiniTestOct2016.zip).
I have dropbox, but it is only linked to its own folder on the Local C drive of my PC.
There is nothing else that would be accessing the NAS Location the project folders are in.
The project was created when I made the first post in this thread to test whether the most basic of projects would work, as my previous app wouldn't.
I have a Network share on the NAS, which contains a folder for "B4A Projects", and within that is a subfolder for each project.
The B4A IDE happily saves to and loads from that location, and says it has compiled ok when I compile either Debug or Release. But I find the APK's don't seem to work, and it sounds like you have confirmed that you see no code in the APK i sent through, which was my suspicion.
I have no doubt that I have a configuration issue, quite possibly from the Win7 to Win 10 update, but would be grateful of any pointers that might assist me fixing it.
 
Upvote 0

Steve Beer

Member
Licensed User
Longtime User
Thanks Klaus, but as Erel has subsequently identified above, the APK compiled on my PC contains no code, which confirms the nature of my problem. I had no doubt if recompiled on another machine it would work, as the test project could not be simpler. That was why I asked for the apk to be tested without recompiling. The Compiler on my machine however seems to be reporting success and creating an APK file, but forgetting to put the code in it.
 
Upvote 0

Steve Beer

Member
Licensed User
Longtime User
Update. I have resolved my problem. I have moved the project folders to the local C: drive and all appears to be working again.
Looking at the Project list at the bottom of the B4A IDE File menu, I was running ok from the NAS drive previously.
Thank you all for you help on this thread.
 
Upvote 0
Top