airsdk / Adobe-Runtime-Support

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

Build APK file, failed with AirSDK 33.1.1.575 #1149

Open MESepehr opened 2 years ago

MESepehr commented 2 years ago

I want to build an apk file I don't have any problem with last version of adobe 33.1.476 but in this version(33.1.1.575) the process fails and I see this error message :

F:\Tools\AirSDK\Air33\bin\adt -package -target apk-captive-runtime -storetype pkcs12 -storepass xxxx -keystore "cert/MasterWin.p12" MasterWin.apk android.xml MasterWin.swf Data swc AppIconsForPublish -extdir ".\native"

NOTE: Multiple Android build-tools folders exist, choosing the latest version (30.0.3) for packaging dx tool failed:no main manifest attribute, in F:\Tools\AndroidSDK\build-tools\30.0.3\lib\d8.jar

and this is my adt log file on windows directory: adt.log

how can I solve this bug?

ajwfrost commented 2 years ago

Hi

Short term ... please back up/rename the d8.jar from that build tools folder, and copy the one in from 30.0.2 or earlier (or the one that's in the AIR SDK lib/android/bin folder)

I have no idea why, but starting with 30.0.3 onwards, it seems that the d8.jar file is missing the main class name from the manifest file. We can work around it in ADT I believe but until that's ready, you'd need to downgrade the d8.jar to an earlier version..

thanks

MESepehr commented 2 years ago

I set AndroidPlatformSDK path in adt.cfg and then call F:\Tools\AirSDK\Air33\bin\adt -package -target apk-captive-runtime -storetype pkcs12 -storepass xxxx -keystore "cert/MasterWin.p12" MasterWin.apk android.xml MasterWin.swf Data swc AppIconsForPublish -extdir ".\native" when I comment AndroidPlatftarmSDK path and recall adt , the problem solved for me, I think AndroidPlatftarmSDK path in adt.cfg only works for aab output

ajwfrost commented 2 years ago

Yes - although it should work really, with that platform SDK path, when using an APK target. It's just that your Android SDK has got a more recent version of d8.jar in it, and the ADT code uses that for preference rather than the version that's distributed with the AIR SDK. If you take away the Android SDK setting then ADT just uses its own version of d8 which still has the class manifest.

So, a few options, but we should be able to fix it so that you can have the new Android SDK build tools working properly with APK generation ...

thanks

MESepehr commented 2 years ago

ok thank you for your information, but I have another bug in this version!

[Fault] exception, information=SQLError: 'Error #3125: Unable to open the database file.', details:'Connection closed.', operation:'open', detailID:'1001'
Execution halted in 'MasterWin.swf' at 0xffffffff (-1)

In fact, I have a SQLite database and copy this database to the phone storage of my users (get storage permission)and use this in my app I don't have any problem with the last version of adobe air SDK(33.1.476 and older) but in the newest version (33.1.575) I have this issue and my app crash in android version If necessary I create new issue and report the problem there

ajwfrost commented 2 years ago

I have another bug in this version

For this, please open a new issue, and add in a code sample or APK file (built with apk-debug command) that can be used to reproduce the problem. I suspect that it's just the folders no longer being accessible with the latest Android API level though..