Jump to content
AndreaM

Alexandria - "Generate Android App Bundle file" not found in Options

Recommended Posts

I'm using Alexandria (RAD Studio 11.1) but when I try to configure my Android 64 bit project in the Options > Building > Delphi Compiler > Compiling options. After select "All configurations - Android 64-bit platform" as the active target, I don't found in the "Other options" the "Generate Android App Bundle file (arm + arm64)". In the online manual at this link:

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Submitting_Your_Android_App_to_Google_Play

there is also an image showing this option, but in my delphi it is not present!

This option instead is present in 10.4.1.

Without this option it is not possible to have an .aab file to upload to the Google Play Console.

Can someone help me?

  • Like 1

Share this post


Link to post

Its available under All Android 64 Bit, and should be under Release Android 64 Bit as well

image.thumb.png.1df7d3f8442687c4132ab42245dd4575.png

 

Did you switch in both Android 32 and 64 to the Application Store ?

image.png.dfde025d9570d8af1a5a60d3b1a31e0d.png

 

Did you provide in the Project options provisioning the requred data and verified it ?

image.thumb.png.27601e1664f549109441dc030cab8d99.png

 

  • Like 1

Share this post


Link to post

Thanks for the reply.

I followed all the directions you posted to me.

See my settings ...

image.png.24d7cf432aaa27f76271e10374b07c92.png

 

image.thumb.png.5496f577605a3b23da4c5cc213187b64.png

 

image.thumb.png.3e3c92b355ff4352cf1afcba08cea301.png

 

 

If I set this

image.thumb.png.8a2390c1ca4140afbc3253b5aaa5901a.png

I have a .APK file!!! Not a .AAB file!

 

If I set this:

image.thumb.png.5ff6910c1200632833e2e58daf479d93.png

I have a .AAB file.

 

 

In the Google Play Console with the .APK file ..\Android64\Base\MyProjectName\bin\ I have this error:

image.thumb.png.9316d2472dbde17e2d0ff9e95de521c1.png

with this error:

You uploaded an APK signed with a different certificate than previous APKs. You must use the same certificate. Your current APKs are signed with certificates with the fingerprint:

SHA1: ....

while the certificates used to sign the loaded APK have the fingerprint:

SHA1: ....

 

 

 

In the Google Play Console with the .AAB file from dir ..\Android64\Release\MyProjectName\bin\  I have this error:

image.thumb.png.562fbe06ba259e1a445659a51d796197.png

 

Thanks again for your help

Edited by AndreaM

Share this post


Link to post

How do you generate yout APK file ?

For release it should not only compiled as usual, but deployed:

First in Release "Build" or "Build all"

Then "Deploy" to create and bundle the AAB

image.png.c4371848506bff38b9aedfb580c8fba3.png

 

Is this the way how you are doing it ?

 

 

Edited by Rollo62

Share this post


Link to post
Hi.
It is the same operation. It can be done both ways. For the deployment, however, this is the main screen:

image.thumb.png.7c27a4d90e4cba8628f9b6b17ac610fa.png

 

To have this with all files:

image.thumb.png.b3960d500d7ff833072dd1df120b2f82.png

(I cut the image).

 

But I think the problem is in the Google Play Console web page in "App Integrity" -> "App signing".

See this image.

 

 

 

I don't now how to encrypt my private key.

 

image.png

Edited by AndreaM

Share this post


Link to post

Not sure what went wrong, it looks a bit as if you not have activated the necessary AAB Signature and keystore yet in the PlayStore.
I have made an older, probably outdated, description here, and there were also interesting links in the German DP howto generate that keys.

 

More or less the process should be still the same, but Google might have changed the fineprints during the last years, I haven't checked that recently.

Share this post


Link to post

Hi.

 

Thanks for the last post. It helped me find the solution!

I have put the procedure below, which is quite long.

[Sorry for my english]

 

I solved it this way.
You have to go to the Google Play Console site and when you make a new release or edit a release ("Production" -> "Edit release") in the screen with title "App Integrity" below you will see "Releases not signed by Google Play".

Then a special procedure must be carried out in order to register an "Android App Bundle".
Under the wording "Releases not signed by Google Play" press "Opt in" (or go with the menu on the left in "Setup" -> "App Integrity").

 

image.thumb.png.41ea6a8150c2265534d7eef6c143c1df.png


Here the screen has the title "App integrity" and you have to go to "App signing" and make a choice between the 2 + 2 others (in the advanced part below).

 

image.thumb.png.1357158afbc0294d7e206568ceeeeb49.png


For Delphi it is better to select "Use existing app signing key from Java KeyStore". Here you have to follow the three instructions on the screen.
1) Download the pepk.jar file and put it in a specific dir.
2) Then you must have a latest version of JAVA and use the DOS prompt with this command:

java -jar PATH_TO_PEPK --keystore=PATH_TO_KEYSTORE --alias=ALIAS_YOU_USE_TO_SIGN_APK --output=PATH_TO_OUTPUT_FILE --encryptionkey=GOOGLE_ENCRYPTION_KEY

See also here:
https://stackoverflow.com/questions/52269806/error-running-pepk-app-signing-tool-at-command-line-java-jar-pepk-jar

With legend:    

    PATH_TO_PEPK = Path to the pepk.jar you downloaded, could be something like C:\Users\YourName\Downloads\pepk.jar for Windows users.
    PATH_TO_KEYSTORE = Path to keystore which you use to sign your release APK. Could be a file of type *.keystore or *.jks or without extension. Something like C:\Android\mykeystore or C:\Android\mykeystore.keystore.
    ALIAS_YOU_USE_TO_SIGN_APK = The name of the alias you use to sign the release APK.
    PATH_TO_OUTPUT_FILE = The path of the output file with .pem extension, something like C:\Android\private_key.pem
    GOOGLE_ENCRYPTION_KEY = This encryption key should be always the same. You can find it in the App Signing page, copy and paste it. Should be in this form: eb10fe8f7c7c9ddn2o1idj203jd0232f715022017b00c6471f8ba8170b13049a11e6c09ffe3056a104a3bbe4ac5a955f4ba4fe93fc8ce
    
For Delphi
    PATH_TO_KEYSTORE: Project - Options - Deployment - Provisioning - Target="Release configuration - Android 64-bit platform" - Build type="Android 64-bit - Application Store" - "Keystore File".
    ALIAS_YOU_USE_TO_SIGN_APK: Project - Options - Deployment - Provisioning - Target="Release configuration - Android 64-bit platform" - Build type=" Android 64-bit - Application Store" - "Alias in Keystore".
    GOOGLE_ENCRYPTION_KEY: the specific one for our app that is in the screen.

When it launches it asks:
The keystore password: see in Delphi Project - Options - Deployment - Provisioning - Target="Release configuration - Android 64-bit platform" - Build type="Android 64-bit - Application Store" - "Keystore Password".
The alias password: see in Delphi Project - Options - Deployment - Provisioning - Target="Release configuration - Android 64-bit platform" - Build type="Android 64-bit - Application Store" - "Alias password".
    

image.thumb.png.a313a6a0a88619279a1e2210e7516e83.png


Example:
             
java -jar "C:\Pepk\pepk.jar" --keystore="C:\Project_RAD\Myapp\Android_KeyStore\my.keystore" --alias="myalias" --output="C:\APP_PEM\file.pem" --encryptionkey=eb10f01201djqidji2d3o2ba4fe93fc8cef27558a3eb9d2a529a2092761fb833b656cd48b9de6a

The file obtained in output is a .PEM file which is the "Private key".

 

3) Take the .PEM file and upload it to the "App integrity" page.

A check will be carried out and if everything is ok then on the page "Create production release" ("Production" - "Edit release") under "App integrity" the message will appear:
"Releases signed by Google Play" with green check. At this point it will be possible to upload an .aab file.

 

image.thumb.png.b044e0c403badfc48e58465c4c12ec11.png

 

 

  • Like 1

Share this post


Link to post
31 minutes ago, AndreaM said:

I have put the procedure below, which is quite long.

Quite odd - I haven't had to to that (I submitted a release just over 2 weeks ago), and haven't heard of anyone else that has needed to, either.

Share this post


Link to post
7 hours ago, Dave Nottage said:

Quite odd - I haven't had to to that (I submitted a release just over 2 weeks ago), and haven't heard of anyone else that has needed to, either.

Strange, I was forced to do that in order to update AAB, no way to opt-out.

And it makes a kindof sense if Google re-bundles your app, to deliver optimized packages to certain phones, depending on the And32/64 bit size.
They would need the keystore to re-sign the app, I think is whats happening behind the scenes.


Maybe you had an existing app, which was started at APK, I had seen a note from Dalija that its still possible to upload APK (maybe only for And-32).

 

So far I understood that after the deadline also old and new updates to existing apps needed AAB Bundle, which had to be activated first time.
There were several ways to do that, I used the way by uploading Keystore, since this is offere by RX11 IDE too.
 

The ever-changing UI looke like this, 2-3 years ago:


Saying ...

If you want to use AAB ... you have to have Google to manage your signature keystore.
 

1. Upload an keystore exported from Android Studio
2. Export and upload a key from a Java-Keystore
3. Export and upload a key(NOT from a Java-Keystore)

 

image.thumb.png.7c4af1e02e46865c0c773e6ed8741f9a.png

 

2. Was the option I used, simple with my existing keystore.
Maybe different options arise when using option 1.) or 3.), this is how it looked like

 

 

image.thumb.png.ccadf605c4aebafe4aaabc7b25c766c5.png

 

image.thumb.png.bc31e6dd2abbf03dada5730b17c40845.png

 

 

 

 

image.png

Edited by Rollo62

Share this post


Link to post
2 hours ago, Rollo62 said:

Maybe you had an existing app, which was started at APK

It was a totally new app. I uploaded an .aab file generated from the IDE in App Store configuration. The keystore file was also generated in the IDE on the Provisioning Page. I did not have to do the things you described - I guess the IDE manages that?

Share this post


Link to post

Ok, I also had created a new app recently, but this was rejected and I had to upload the App Signature process similar as above before,
to get the keystore into the AppStore.

If that is the case, maybe the difference is that I used the same keystore for several apps, which looks maybe suspicious to Google.
I intended to use the same keystore per one company, to avoid keystore / password / alias hell 🙂

Maybe its a better idea to generate a new one for each app, next time I will try to create a brand new keystore to see if that makes a difference.

Edited by Rollo62
  • Like 1

Share this post


Link to post

I confirm that the app on which I had to carry out the procedure described above already existed and that it was distributed with .APK files with RAD Studio 10.2, 10.3 and finally 10.4.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×