Android Question "App not installed" why ?

amorosik

Expert
Licensed User
I am using B4A ver 11.80
Smartphone with Android 11
B4A-Bridge 2.65

When I try to transfer, after compilation, the code on the phone, the installation request is presented, which I confirm
After a few seconds an "App not Installed" appears.
I state that:
- several apps have already been installed on this phone
- there are no problems of lack of memory on which to install the app
- on a Samsung always with Android 11 the same app is installed and started correctly running
- no information useful to understand the problem appears on the log window of the B4A ide

The question is: how to understand why the app is not installed?

File Manifest:
AddManifestText(
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="30"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

AddApplicationText(
<uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />

<meta-data
  android:name="com.google.android.geo.API_KEY"
  android:value="api_google_key"/>
)

AddPermission("android.permission.FOREGROUND_SERVICE")
AddPermission("android.permission.ACCESS_FINE_LOCATION")
AddPermission("android.permission.ACCESS_COARSE_LOCATION")
SetServiceAttribute(Tracker, android:foregroundServiceType, "location")
 

JohnC

Expert
Licensed User
Longtime User
Try deleting the existing copy of the app on the phone and then see if it will now install.
 
Upvote 0

amorosik

Expert
Licensed User
...if copy apk and run it.. the same with bridge?

If i load the apk via web browser to phone, the installation start correctly, but "App Not Instaled" is showed
It was the package name, changed from b4a.example to peppe.b4a.example now installation and app execution works fine
 
Upvote 0

amorosik

Expert
Licensed User
The usual reason for this is that an installed app with the same package name has a higher version number than the one you are trying to install. The solution is to uninstall the existing app before installing the new one.

Ah, very interesting information
When there is time, i try the same app with original package name B4A.EXAMPLE and Version Number very high
Your 'Version Number' is #VersionCode on app ?
 
Upvote 0

amorosik

Expert
Licensed User
I just tried Package Name B4A.EXAMPLE (as originally)
#VersionCode: 1000

But the same 'App Not Installed' is returned
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
I just tried Package Name B4A.EXAMPLE (as originally)
#VersionCode: 1000

But the same 'App Not Installed' is returned
It will be better find this B4A.EXAMPLE and uninstall.. then reboot device... and install your new app...
or just change the name of new app...

Classic Reboot after uninstall (because may be there is a service running or something crashed)

Sometimes... apps have services... services need to destroyed/cancelled... to leave you update them...
 
Upvote 0
Top