Android Question [SOLVED] App compiles but will not install

RKM904

Member
Licensed User
Longtime User
I have built the first sample app provided in the introduction to B4A in the B4X booklets prepared by Klaus (thank you Klaus).
I am using B4A-bridge and the indicators are that when I compile and run the app, B4A indicates that the app has been successfully installed.

However, on my phone it first shows a message: "Do you want to install an update to this existing application? Your existing data will not be lost" The options are "Cancel" and "Install". Clicking on "Install" the phone indicates "Installing" and then displays a message "App not Installed". There is no other error message displayed. (screen shots attached)

My configuration is:

  • B4A licensed copy Ver 9.50
  • Phone: Samsung Galaxy A10e running Android 9
  • On the phone I have set "Install unknown apps" to allow apps from B4A
  • Using B4A bridge wirelessly
  • I am not getting any anti-virus intercepts (I'm using Vipre anti virus)

The compile log is shown below
B4X:
B4A Version: 9.50
Java Version: 11
Parsing code.    (0.00s)
Building folders structure.    (0.01s)
Compiling code.    (0.01s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Generating R file.    (0.00s)
Compiling generated Java code.    (1.06s)
Convert byte code - optimized dex.    (0.32s)
Packaging files.    (0.15s)
Copying libraries resources    (0.00s)
Signing package file (debug key).    (0.81s)
ZipAlign file.    (0.04s)
Installing file to device.    (0.07s)
    Installing with B4A-Bridge.
Completed successfully.

At this point, I don't know if the issue is within B4A, B4A-bridge, my phone or somewhere else.
Any guidance or advice would be greatly appreciated. (Perhaps pointing me to a log or logs that help determine a starting point in problem resolution)
 

Attachments

  • Screenshot_20191227-135945_Package installer.jpg
    Screenshot_20191227-135945_Package installer.jpg
    96.1 KB · Views: 243
  • Screenshot_20191227-135952_Package installer.jpg
    Screenshot_20191227-135952_Package installer.jpg
    49.1 KB · Views: 199
  • Screenshot_20191227-135956_Package installer.jpg
    Screenshot_20191227-135956_Package installer.jpg
    50.5 KB · Views: 224

JohnC

Expert
Licensed User
Longtime User
The possible problem is with the package name (in "Project....Build Configurations" menu) and the version of your app.

If you try to install a version of an app (with particular package name) that is less then the version of an app (with the same package name) that is already on the device, you will get this error.

Many of the example apps in the forum use "b4a.example" as the package name, so if you already installed other example programs on your phone that use this example package name and you are now trying to install a different app that uses this same package name, it can cause problems if the app you're trying to install has a lower version number.
 
Last edited:
Upvote 0

RJB

Active Member
Licensed User
Longtime User
So uninstalling the current 'example' app should allow the new one to be installed.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Yes - if the app you are uninstalling has the same package name as the app you are trying to install.
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
The quickest fix is to just use a new/unique package name for your new app so it wont conflict with any example apps.
 
Upvote 0

RJB

Active Member
Licensed User
Longtime User
Its the name that is 'example'. So if you want to install different apps then give them different names!
Menu: Project/ Build Cinfigurations/ Package
Project Attributes: #ApplicationLabel: B4A Example
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
No, you can have two apps with the same name (Applicationlabel, for example you can have two apps with the title of "Email"), but you can not have two apps with the same package name - this will give you that error if the existing package name app has a higher version number then the same package name app you are trying to install.
 
Upvote 0

RKM904

Member
Licensed User
Longtime User
Problem solved, thanks to JohnC and RJB. Giving the app a new unique name as John suggested solved the issue immediately. I've changed the heading to "SOLVED".
Many thanks for bearing with a newbie and his questions. YOU GUYS ARE GREAT!!
 
Upvote 0
Top