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.