Android Question how to compile apk 64 bit

suciwulans

Active Member
Licensed User
Longtime User
i have 2 komputer A and B
komputer A windows 7 32 bit, jdk 32 bit, B4A 32 bit
komputer B windows 10 64 bit, jdk 64 bit, B4A 64 bit
from computer A i compiled source code then i copied from object folder to my smartphone android ver 5 and install succesfull
from computer B i compied same source code then i copied from object folder to 2nd smartphone android ver 11 and install failed.
my question is why i compiled source code on 64 bit computer failed install to 2nd smartphone? is it result compiled from 32 bit or 64 bit is APK 32 bit?
how to compile the source code to APK 64 bit that suitable for smartphone android 11?
 

teddybear

Well-Known Member
Licensed User
i have 2 komputer A and B
komputer A windows 7 32 bit, jdk 32 bit, B4A 32 bit
komputer B windows 10 64 bit, jdk 64 bit, B4A 64 bit
from computer A i compiled source code then i copied from object folder to my smartphone android ver 5 and install succesfull
from computer B i compied same source code then i copied from object folder to 2nd smartphone android ver 11 and install failed.
my question is why i compiled source code on 64 bit computer failed install to 2nd smartphone? is it result compiled from 32 bit or 64 bit is APK 32 bit?
how to compile the source code to APK 64 bit that suitable for smartphone android 11?
I guess your B is using a different private sign key than A . try to copy it from A to B.
 
Upvote 0

suciwulans

Active Member
Licensed User
Longtime User
There is no such thing. The generated APK is always 64 bit and 32 bit.

The only exception is if you are using a library with a native binary (SQLCipher for example) and it misses one of the architectures.
how to generate APK 64 bit on computer B?
 
Upvote 0

CaptKronos

Active Member
Licensed User
Longtime User
As Erel said, all APKs are both 64 and 32 bit. It doesn't matter whether you use computer A or B. The problem must be somewhere else. Perhaps your app uses features that are not supported on Android 11? What is the error message you see when you try to install the APK from computer B?
 
Upvote 0

suciwulans

Active Member
Licensed User
Longtime User
As Erel said, all APKs are both 64 and 32 bit. It doesn't matter whether you use computer A or B. The problem must be somewhere else. Perhaps your app uses features that are not supported on Android 11? What is the error message you see when you try to install the APK from computer B?
when i try to install APK, smartphone said that application failed to install.
 
Upvote 0

CaptKronos

Active Member
Licensed User
Longtime User
If Teddybear's suggestion doesn't work, check that your manifest doesn't have a minSdkVersion greater than 21 since you are using a phone with Android 5. I think you would get a different error message if that was the case, but you might as well check.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
If Teddybear's suggestion doesn't work, check that your manifest doesn't have a minSdkVersion greater than 21 since you are using a phone with Android 5. I think you would get a different error message if that was the case, but you might as well check.
I don't think it's that, he is using the same source code and the same phone.
 
Upvote 0

JGParamo

Active Member
Licensed User
The JDK and Android SDK platform versions you have used could have caused the 2nd phone not working, as newer versions of Android may not allow installation of APKs compiled with old JDK and SDK, such as: using JDK 8 (jdk1.8.0) or earlier may need Android SDK 28 or earlier to run on Android 10 or earlier; OpenJDK 11 to 19 may need Android SDK 30 or newer for latest Android version, I guess. Try other combination of JDK and SDK.
 
Last edited:
Upvote 0
Top