Android Question How to generate a signed apk on B4A?

I want to develop an apk for a machine using B4A, but that machine will only accept apks signed with a certain key, and whenever I try to run the application through B4A-Bridge it cannot install the generated B4A Example.

In summary My main question is, how to sign an apk within a project in B4A?

In Android Studio I sign in build.gradle in the 'signingConfigs' part, and in B4A what is the way to sign an application?
 

DonManfred

Expert
Licensed User
Longtime User
will only accept apks signed with a certain key
What key you are talking about? Can you post the full error?
 
Upvote 0

What key you are talking about? Can you post the full error?

Well, it's not actually a code error or something similar.
The machine I'm using only accepts applications that are signed as for example in this code in Android Studio.

Build Gradle:
signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'android'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
}

But as I mentioned earlier, what is the way to create a signed apk on B4A?
Where exactly are these settings?
Could it be in Project -> Manifestor Editor?
 
Upvote 0
Do you have a sign key file? Load it with Tools - Private Sign Key.

You can set the alias with the #SignKeyAlias in the main module.

Well, I followed the steps you recommended and I get the following error:

jarsigner error: java.security.SignatureException: private key algorithm is not compatible with signature algorithm

Looking for the Forum I found an answer (erro do jarsigner) from you about this same error, saying that it is only possible to subscribe after obtaining the APK, while using the debug key.

However, my problem as at the beginning of the post, the machine on which I am developing the application through B4A, only accepts installation of APKs signed with the following files:

B4X:
myApk {
            storeFile file('keyName.jks')
            storePassword '....'
            keyAlias '....'
            keyPassword '...'
    }

But the Post is from 2014, is there anything currently that can help me carry out the development of an application already with the signature configured in Tools -> Private Sign Key and #SignKeyAlias ??
 
Upvote 0
Develop with the debug key. When you are ready to distribute the APK, build it with the command line builder and without signing it. It will allow you to sign the APK yourself with jarsigner and any setting you need.

Yeah, but my real problem is that there is no way I can run with the debug key. As I said earlier, this machine only accepts apks, even in debug mode, with the subscription key configured and working.

Unfortunately, then I believe there is no way for me to be able to develop, as I will not be able to present the screens and logs. And as with each change, he updates the installation through the B4A Bridge, I believe that there is no way without the subscription.
 
Upvote 0
Top