[Android] [2 issues] 1) Is it possible to release '.aab'? 2) '.apk' release error

2 issues

  1. Is it possible to release ‘.aab’?

  2. ‘.apk’ release error

  3. In order to release Android, ‘.aab’ file is required. Is it possible with a ‘processing’ program?

  4. ‘.apk’ is created through debugging, but an error occurs when released.



  • Android mode : 4.2.1
  • Processing : 3.5.4

Please help me.~

@GWAK I want to be certain that you have tried to run File/Export AndroidProject.

export

On a Mac I had to delete the uses-sdk android:minSdkVersion entire line in the manifest in order to get it to run. https://discourse.processing.org/t/specific-icon-generator-for-processing-android-project/31989

1 Like

@svan
before:
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="29"/>
after:
<uses-sdk android:targetSdkVersion="29"/>

right?

On a Mac I had to delete the entire line. I initially tried what you did and only removed the minSdkVersion but that failed and the only way I could get it to run was delete the whole line.

1 Like

Dear svan,
As you said, it works fine after ‘delete’.
thank you. very very thanks.
.
.
Do you know how to output ‘.aab’ ?

@GWAK I’m having trouble remembering what ‘.aab’ does. @Rupesh_Kumar or someone else might know. Perhaps start a new thread with your second question if it doesn’t get answered here.

@svan @GWAK
AAB refers to Android App Bundles. As of now the only way to distribute App is to upload AAB files on Play Console. Earlier APK were uploadable.
I am not sure if we can create AAB from an APK. But I was able to create a Universal APK from the AAB file with the help of the Bundle Tool.

A Pull Request is in review to provide the “Export Signed Bundle” feature. The chances are we can see the feature in the upcoming days.

It is not officially merged in processing for android but you can test the branch by building it with wiki instructions given in the Processing for Android repository, which can be a lengthy process for a user.

For generating bundle now, I would suggest following the following steps:

  • Export Project from PDE with android mode.

  • Now you need to remove the SDK version lines in the manifest as it creates issues while signing( more info in the current thread).

  • Here there are two ways to open the project in Android studio. Either you can open the project directly or if it does not work properly due to Gradle version compatibilities you can create a new project in Android studio with the necessary project ID (i.e com.example.project) and then you can start replacing the folders such as java, resources, libs, asset, manifest file, etc from exported project to the newly created project in android studio.

  • At this point, if the files are replaced properly you can create signed bundles in Android Studio by signing with the existing Keystore or newly created keystore. In case the App is already published and you want to release an update you need to use the same Keystore file by which you signed the app earlier. Otherwise, you may face a publishing error while uploading the app on the play console. It would also be possible to use Keystore from PDE in Android Studio to sign APK or Bundles.

Thanks,
Rupesh Kumar

1 Like

@Rupesh_Kumar

Rupesh_Kumar
Thank you so much for your reply.

But there is a problem.

  1. First of all, I have never played Android Studio.

  2. A person who makes APPs simply with ‘processing Android’.

  3. Do you have a schedule to perform the ‘.aab export’ function as a ‘processing program’?

I will wait for your reply.

thank you.

Hi @GWAK
Earlier I was involved in some other work so was not able to reply. You can download and set Gradle as an environment variable. There are various ways to set the environment variables for various operating systems. The process would be quite similar to setup java in the system. After you would be able to use Gradle commands on the command line, you can export the project and navigate to the exported project’s folder in terminal or cmd based on your system. Now you can try to run the following command:


gradle bundleRelease

after that, the bundle would be generated at this location as


/sketchbook/project_name/android/app/build/outputs/bundle/release as “app-release.aab”

as mentioned in detail in this thread

Thanks,
Rupesh Kumar

1 Like

@Rupesh_Kumar

gradle bundleRelease

Genius teacher, thank you so much for your reply.
Where should I add that command?
I see what you’re talking about. But can you tell me how to add it?
I would appreciate it if you could tell me how to add ‘gradle bundleRelease’.

Hey there @Rupesh_Kumar
I’ve been trying to generate an .aab with the pull request you made to the Processing for Android code, but I’m struggling to make it work. Would you mind guiding me a bit through the process?
First of all, it doesn’t matter where I place your code, the option to export as .aab doesn’t show either way. Where exactly do I have to place the “processing-android” folder, inside C:\User\Documents\Processing\modes, or inside the project folder itself?

Thank you so much for keeping Processing for Android up to date.

1 Like

Hi @ArtP
Welcome to the community!
Placing the cloned “processing-android” from the repository and placing it inside the \modes would not work. Certain build instructions need to be followed which is mentioned on the wiki pages here - Building Processing for Android · processing/processing-android Wiki · GitHub to build and run the android mode(can be a little longer process for the first time). I have used the eclipse part to build and run the android mode. Please keep in mind that, as the code is not yet merged and is under review, the official Processing for Android release is more stable.

All the best,
Rupesh

1 Like

I just saw you have asked me something @GWAK
Gradle is a command-line utility that is used by android studio. You can use Gradle in command prompt or power shell of windows if the Gradle is set in environment variables. After navigating the command prompt to a specific folder of the project exported by Android Mode with ‘cd’. You can run the “gradle bundleRelease” and after you see build successful in the command line, The aab file will get generated at “ExportedProjectPath/app/build/outputs/bundle/release”

I hope this helps.

All the best,
Rupesh Kumar

1 Like

@Rupesh_Kumar

Thanks for the kind explanation.

Is it possible to make it possible in ‘Processing’?
Is there a schedule related to the project that causes ‘aab’ to be output from ‘Processing’?
Or, is it only possible in ‘Android Studio’?

Hi @GWAK , Happy to tell you that aab code has been merged and is in process of release after some final adjustments. We soon may see the AAB generation by Android Mode.

Happy Learning,
Rupesh

1 Like

@Rupesh_Kumar

Thanks for your reply.
I wish you good results.
We support you.

1 Like

Update: AAB Export support is available now in the latest Android Mode’s release(Current release at the time of posting - 4.5.0 a4) compatible with the current latest Processing 4 version 4.0b8

1 Like

@Rupesh_Kumar

very nice!.
very thank you!.

Unfortunately, I am unable to get this to work on a Mac (v.11.6 BigSur) with latest Processing version 4.0b8. Tools/Manage Tools/Modes states that Android mode 4.5.0 a4 is installed, but when I try to use it an error occurs:

In the second image, is there any more information present like classes line numbers and all? Can you share to check the origin of the error?
Please create a separate thread here or an issue at processing Android github repo with methods to reproduce the issue in detail if possible.

Thanks!
Rupesh