Android Question APK does not work

apti

Member
I created an APK for my app. I used the release version in the IDE and ran the program then copy the APK file. It installed fine on an android 11 (also the same one I tested using b4a bridge). however when I try to install it on an android 8 device, it crashes the installer with no error message other than the installer is closing. Coincidentally, it also trashed the 3rd party file manager I used. That app now crashes anytime I look at the folder I placed the apk file in. Not sure if there is a relation there. I tried on an android 4 and also fails to install but says "there was a problem parsing the package"
I already went thru web searches and the useful info they give is not as useful as they thought.

Can't upgrade android any further.
APK file is fine
permissions fine
allow other sources is set

Either way, is there something I am missing with the apk? Maybe a setting in B4A that would fix it?
 

teddybear

Well-Known Member
Licensed User
Post your manifest. what is the minSdkVersion? try setting minSdkVersion="14" for android 4.
 
Upvote 0

apti

Member
Might be related to a very large icon size (image size, not file size).
I did read about the icon size problem and you may be right there. But I could not find anything about what a good icon size is. Can you make me a little less stupid and fill in that information for me?
 
Upvote 0

apti

Member
Post your manifest. what is the minSdkVersion? try setting minSdkVersion="14" for android 4.
this is the manifest. keep in mind I am an experienced programmer but new to B4A, so I am willing to absorb good knowledge.


'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34"/>
<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.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I did read about the icon size problem and you may be right there. But I could not find anything about what a good icon size is. Can you make me a little less stupid and fill in that information for me?
Make a test to find out whether this is actually the reason for this problem. Delete the icon. The default one will be used.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
I did read about the icon size problem and you may be right there. But I could not find anything about what a good icon size is. Can you make me a little less stupid and fill in that information for me?
As Erel said, create a default project to make a test,
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34"/>
The minSdkVersion="21", it will not be installed on android 4, if you would like to install it on android 4, try changing it to 14
 
Upvote 0

apti

Member
As Erel said, create a default project to make a test,

The minSdkVersion="21", it will not be installed on android 4, if you would like to install it on android 4, try changing it to 14
I will try both of those things as soon as I have a chance to sit. Monday is not usually a day I get to sit. This will be installed on a range of devices from android 4.4 to 13, does changing 14 cover it all? and what does changing it to 14 mean? is there some correlation that I would be able to understand 14 will allow lower android versions?
 
Upvote 0

apti

Member
again I am missing something here. How do you remove the icon from the project? I can only see a place to choose it but not remove.
 
Upvote 0

apti

Member
It worked. I removed the icon and install went fine. Now can you teach me about the icons? specifically the sizing of the icons so I do not make the same mistake again. I tried to look it up but had conflicting and confusing information.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0
Top