Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
Correct detection of latest Android build-tools versions
Discussed in https://github.com/airsdk/Adobe-Runtime-Support/discussions/997
Originally posted by marchbold July 21, 2021
When specifying an Android SDK via the -platformsdk option we are seeing the message
NOTE: Multiple Android build-tools folders exist, choosing the latest version (29.0.0 rc4) for packaging
Just wondering what process you are using for deciding the latest version, as it seems to change for different builds on my machine and is not the latest version I have installed?
eg I have all these installed in $ANDROID_HOME/build-tools, as you can see 29.0.0 is not the latest.
22.0.0
24.0.0
24.0.3
25.0.0
25.0.2
25.0.3
26.0.0
26.0.1
26.0.2
27.0.0
27.0.2
27.0.3
28.0.0
28.0.0-rc2
28.0.1
28.0.3
29.0.0
29.0.2
29.0.3
31.0.0
```</div>
I keep getting the following error when I have build tools 31 installed. If I uninstall it everything works as should with 30, however this is not an option for me.
Is there a way to select manually which build tools to use?
*** ADT Logging at 2021/10/04 16:22:52 ***
Called by: I:\Development\flex-sdks\4161_331_633\lib\adt.jar
ADT 33.1.1.633 called with: -package -target apk-captive-runtime -arch armv8 -storetype PKCS12 -keystore E:\Development\Bitbucket\trekrecord-flex\simpleapps_android_dev_2048_2021.p12 -storepass xxxxxx E:\Development\Bitbucket\trekrecord-flex\bin-debug\Main.apk E:\Development\Bitbucket\trekrecord-flex\bin-debug\Main-app.xml -extdir E:\Development\2_ANE\distriqt\ANE-Core-master\lib -extdir E:\Development\2_ANE\distriqt\ANE-Firebase-master\lib -extdir E:\Development\2_ANE\distriqt\ANE-IDFA\lib -extdir E:\Development\2_ANE\distriqt\ANE-PushNotifications\lib\OneSignal -extdir E:\Development\2_ANE\distriqt\ANE-AndroidSupport\lib -extdir E:\Development\2_ANE\distriqt\ANE-GooglePlayServices\lib -extdir E:\Development\2_ANE\distriqt\ANE-CameraRollExtended\lib -extdir E:\Development\2_ANE\distriqt\ANE-SquareLibs\lib -extdir E:\Development\2_ANE\distriqt\ANE-Application\lib -C E:\Development\Bitbucket\trekrecord-flex\bin-debug Main.swf -C E:\Development\Bitbucket\trekrecord-flex\src assets -C E:\Development\Bitbucket\trekrecord-flex\src locale -C E:\Development\Bitbucket\trekrecord-flex\src google-services.json
Overriding request for apk-captive-runtime, instead generating Android App Bundle
Ignoring architecture request for AAB target
AAB Packager entry point
Version in APK = 33.1.1.633, version of ADT = 33.1.1.633
Version in APK = 33.1.1.633, version of ADT = 33.1.1.633
Version in APK = 33.1.1.633, version of ADT = 33.1.1.633
Version in APK = 33.1.1.633, version of ADT = 33.1.1.633
Gradle build command: C:\Program Files\Java\jdk1.8.0_271\bin\java.exe -Xmx4048m -Dorg.gradle.appname=gradlew -Dorg.gradle.jvmargs=-Xmx4048m -Duser.dir="C:\Users\leo_s\AppData\Local\Temp\c6af1f23-970d-4d9b-a890-762a736460af" -cp "I:\Development\flex-sdks\4161_331_633\lib\android\bin\gradle-wrapper.jar";"I:\Development\flex-sdks\4161_331_633\lib\android\bin\gradle-cli.jar" org.gradle.wrapper.GradleWrapperMain :app:bundleRelease
..java.base/java.lang.Thread.getStackTrace(Thread.java:1602)
..com.adobe.air.DebugFile.printStack(DebugFile.java)
..com.adobe.air.ADTException.<init>(ADTException.java)
..com.adobe.air.apk.AABOutputStream.buildGradle(AABOutputStream.java)
..com.adobe.air.apk.AABPackager.renameOutput(AABPackager.java)
..com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java)
..com.adobe.air.apk.AABPackager.createPackage(AABPackager.java)
..com.adobe.air.ADT.parseArgsAndGo(ADT.java)
..com.adobe.air.ADT.run(ADT.java)
..com.adobe.air.ADT.main(ADT.java)
Stack trace:
Unexpected failure: Unable to run java: com.adobe.air.ADTException: gradle tool failed: Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:bundleReleaseResources'.
> Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 12s
This one again :-(
> Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
This is related to the fact that the gradle plug-in - and gradle version - that we're using here is unable to cope with the build-tools that don't contain a "dx.jar" tool.
To avoid AIR looking at particular build tool folders, you can make them "hidden" (on Windows). Ideally we'd update everything so we would require people to have the latest Gradle/plugins versions installed (generally by keeping Android Studio up-to-date...)