airsdk / Adobe-Runtime-Support

Report, track and discuss issues in Adobe AIR. Monitored by Adobe - and HARMAN - and maintained by the AIR community.
203 stars 11 forks source link

[macOS] Error packaging aab android package #207

Open mrchnk opened 4 years ago

mrchnk commented 4 years ago

Problem Description

I've encountered problems packaging aab on macOS. Exception during process thrown:

 Bundle tool failed:[BT:0.10.3] Error: An error occurred while trying to read the file '.../output/aab899760346357470953.json"'.
 com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: An error occurred while trying to read the file '".../output/aab899760346357470953.json"'.
    at com.android.tools.build.bundletool.model.exceptions.CommandExecutionException$Builder.build(CommandExecutionException.java:81)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.parseBundleConfigJson(BuildBundleCommand.java:329)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.lambda$fromFlags$0(BuildBundleCommand.java:175)
    at java.util.Optional.ifPresent(Optional.java:159)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.fromFlags(BuildBundleCommand.java:175)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:70)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:46)
 Caused by: java.nio.file.NoSuchFileException: ".../output/aab899760346357470953.json"
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
    at java.nio.file.Files.newByteChannel(Files.java:361)
    at java.nio.file.Files.newByteChannel(Files.java:407)
    at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
    at java.nio.file.Files.newInputStream(Files.java:152)
    at java.nio.file.Files.newBufferedReader(Files.java:2784)
    at com.android.tools.build.bundletool.model.utils.files.BufferedIo.reader(BufferedIo.java:49)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.parseBundleConfigJson(BuildBundleCommand.java:317)
    ... 5 more

I'm using latest AIRSDK 33.0.2.338 on macOS High Sierra 10.13.6 (17G8030)

Steps to Reproduce

Just try to package an AIR application for aab target using adt from AIR SDK

I'm using it like that:

adt -package \
    -target aab \
    -storetype jks \
    -keystore android-debug-keystore.jks \
    -storepass android \
    output/aol.aab aol.descriptor.xml \
    -C output aol-mobile.swf \
    -C icons/android .

Known Workarounds

Use windows machine to package aab

mrchnk commented 4 years ago

Also tried Beta release of SDK 33.1.0.16. Error preserved

dlgames2013 commented 4 years ago

Would you be kind enough to point me in the right direction for an .aab android packaging tutorial, that would be awesome, I'm trying to package a .aab myself but I'm stuck at the command line, managed somehow to package a normal apk but no luck at the .aab since I don't know how to solve the java errors. I need this for Animate CC + Flash Develop(oop as3 code) & Animate CC+Stage(as3 code) projects. Thank you!

ajwfrost commented 4 years ago

Hi - we've not properly got support for AAB yet, there are some fundamental problems that we ran into with their format around the inclusion of resources. It's on the back-burner to see if we can work around those restrictions somehow, but for now please use multiple APKs.

Just one mention though in terms of the original error here, we have had a few issues with that file not being found, and it looks like it's not working out relative paths properly (and also paths with spaces I think!) - so it might be worth trying to organise things so that everything is in the same or a subfolder of the working directory. Other than that, it should just be a case of replacing "apk" with "aab" in the target; but I suspect currently you'll see an AAB error regarding multiple resource entries with the same name..

thanks