airsdk / Adobe-Runtime-Support

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

[java] NOTE: Multiple Android build-tools folders exist, choosing the latest version (34.0.0) for packaging [java] unexpected failure: Unable to run java: com.adobe.air.ADTException: gradle tool failed: ERROR:D8: com.android.tools.r8.internal.Fq: No VersionRequirement with the given id in the table #3315

Open pengyangjin opened 3 months ago

pengyangjin commented 3 months ago

use the air sdk window version 50.2.3.4 get an error:

[java] NOTE: Multiple Android build-tools folders exist, choosing the latest version (34.0.0) for packaging [java] unexpected failure: Unable to run java: com.adobe.air.ADTException: gradle tool failed: ERROR:D8: com.android.tools.r8.internal.Fq: No VersionRequirement with the given id in the table [java] [java] FAILURE: Build failed with an exception. [java] [java] What went wrong: [java] Execution failed for task ':app:desugarReleaseFileDependencies'. [java] > A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction [java] > Error while dexing. [java] [java] Try: [java] > Run with --stacktrace option to get the stack trace. [java] > Run with --info or --debug option to get more log output. [java] > Run with --scan to get full insights. [java] [java] Get more help at https://help.gradle.org/ [java] [java] BUILD FAILED in 44s [java] [java] java.io.IOException: Unable to run java: com.adobe.air.ADTException: gradle tool failed: ERROR:D8: com.android.tools.r8.internal.Fq: No VersionRequirement with the given id in the table [java] [java] FAILURE: Build failed with an exception. [java] [java] What went wrong: [java] Execution failed for task ':app:desugarReleaseFileDependencies'. [java] > A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction [java] > Error while dexing. [java] [java] Try: [java] > Run with --stacktrace option to get the stack trace. [java] > Run with --info or --debug option to get more log output. [java] > Run with --scan to get full insights. [java] [java] Get more help at https://help.gradle.org/ [java] [java] BUILD FAILED in 44s [java] [java] at com.adobe.air.apk.AABOutputStream.buildGradle(AABOutputStream.java) [java] at com.adobe.air.apk.AABPackager.renameOutput(AABPackager.java) [java] at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java) [java] at com.adobe.air.apk.AABPackager.createPackage(AABPackager.java) [java] at com.adobe.air.ADT.parseArgsAndGo(ADT.java) [java] at com.adobe.air.ADT.run(ADT.java) [java] at com.adobe.air.ADT.main(ADT.java)

ajwfrost commented 3 months ago

Likely to be because you're using build tools v34 / compileSdk version 34, but with Android Gradle Plug-in version 7.x..

Can you try adding into your application descriptor, in the <android> section:

<gradleVersion>8.0</gradleVersion>
<androidGradlePluginVersion>8.1.1</androidGradlePluginVersion>

and then also in your adt.cfg file (or via AIR SDK Manager) set your JAVA_HOME value to point to a version 17 JDK (such as you should have within Android Studio's "jbr" folder)?

FYI, AIR SDK 51.0.1.3 makes this change for you automatically..

As an alternative, you could remove the v34 Android platform files, and the v34.0.0 build tools version... but that's not ideal, for the future!

thanks