• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
1

AIR25 - dx tool failed

Participant ,
Feb 23, 2017 Feb 23, 2017

Copy link to clipboard

Copied

Hi,

does anybody else have a problem to package android apk-captive-runtime target with AIR25?

On some Window's machines (both 32 and 64 bit) we have nothing telling dx tool failed error while evaluating building command from command line. On the same machine using older AIR it is working fine.

The command and output looks like:

c:\dev\S3-Build>java -jar ..\AIR-Win-SDK\lib\adt.jar -package -target apk-captive-runtime -storetype pkcs12 -keystore ./cert/S3.p12 Build\S3.apk  android.xml Data/* -extdir ane/

dx tool failed:

Build failed!

Is there some special requirement for AIR25?

Thanks,

David

TOPICS
Air beta

Views

12.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2017 May 22, 2017

Copy link to clipboard

Copied

Was having the same problem which i've managed to resolve by changing my 32 bit java environment to:

java version "1.8.0_131"

Java(TM) SE Runtime Environment (build 1.8.0_131-b11)

Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

i.e. 64 bit JDK

Also, i'm using AIR SDK v25.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

I had this same issue.

Fixed it with the following configuration:

- AIR 25

- Project Properties: AIR Mobile vs 21

- global Java version 1.6 32bits (for FlashDevelop)

- (the MAGIC) edited the adt.bat file to set the java path to a 1.8 64 bits version like this:

     ::@java -jar "%~dp0\..\lib\adt.jar" %*

     "C:\Program Files\Java\jre1.8.0_131\bin\java.exe" -jar "%~dp0\..\lib\adt.jar" %*

Worked for me.

Hope this will help you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 30, 2017 Jul 30, 2017

Copy link to clipboard

Copied

v1v0c4, you are a genius!!!!

I tried a million things. Finally found your post and it worked.

Had to make some changes. I used:

  • jre1.8.0_111 32 bit - For FlashDevelop - Environment variable JAVA_HOME C:\Progra~2\Java\jre1.8.0_111
  • jre1.8.0_111 64 bit - For publishing to devices - Inserted the script in adt.bat (AIRSDK26/bin/adt.bat) as you have suggested: "path_to_64bit_java\bin\java.exe" -jar "%~dp0\..\lib\adt.jar" %*

Both problems (dx and certificate) were solved.

I am using AIR 26 on Win 10.

Thank you a lot!!!! You ended my nightmare!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 07, 2017 Jun 07, 2017

Copy link to clipboard

Copied

Looks like AIR 25 has brought this issue up again.

I solved it by switching from 32-bit jdk 1.7.0_79 to 64-bit jdk 1.8.0_91 (by setting the PATH var in my batch file where I run ADT).

Sounds like 1.8.0_121 may also be incompatible with AIR 25, according to this thread discussing the same problem. May have something to do with the switchover to 64 bit certificates.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

AIR 26, same problem. Java version: 1.7.0_80

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 25, 2017 Jul 25, 2017

Copy link to clipboard

Copied

updated java to the latest 1.8 and now it works

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 27, 2017 Jul 27, 2017

Copy link to clipboard

Copied

I have encountered this problem, I was replaced by 64-bit java can solve this problem, you need to change the system environment variables into 64-bit java, I hope you help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 30, 2017 Jul 30, 2017

Copy link to clipboard

Copied

This problem brought us too many headaches.

Is there any news?

Switching to the 64 bit Java is a very bad way for us, as we use 32 bit FlashDevelop together with 32 bit plugins. If we switch to 64 bit java, we would be forced to switch to 64 bit FlashDevelop.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 04, 2017 Aug 04, 2017

Copy link to clipboard

Copied

I had that problem and it's SOLVED NOW. I use windows 10 64bit, and FlashDevelop with Starling.

I just updated AIR and Java 64 (uninstalled all the JAVA programs first, which probably were 32-bit). And it worked.

P.S. I also changed my project's XML to air 26 and changed the location in my project's SetupSDK.bat to AIR 26.

P.P.S: After uninstalling all JAVA programs I used the link below to install JRE and then JDK.

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 26, 2018 Sep 26, 2018

Copy link to clipboard

Copied

problem still persist even with latest air sdk 31

using jdk 1.8.0_181 64bit(tried other version and jre)

android build tool 28 also min sdk version is 27

dx tool failed:WARNING in com.mapbox.mapboxsdk.log.LoggerDefinition.log:(ILjava/lang/String;Ljava
/lang/String;)V: defining a static interface method requires --min-sdk-version >= 24 (currently 13) for
interface methods: com.mapbox.mapboxsdk.log.LoggerDefinition.log:(ILjava/lang/String;Ljava
/lang/String;)

Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
com.mapbox.mapboxsdk.http.NativeHttpRequest.executeLocalRequest:(Ljava/lang/String;)V:
invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)

Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
com.mapbox.mapboxsdk.log.Logger.log:(ILjava/lang/String;Ljava/lang/String;)V:
invoking a static interface method com.mapbox.mapboxsdk.log.LoggerDefinition.log:(ILjava/lang
/String;Ljava/lang/String;)V strictly requires --min-sdk-version >= 24 (blocked at current API level 13)

Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in
com.mapbox.mapboxsdk.maps.MapView.initialiseDrawingSurface:(Lcom/mapbox/mapboxsdk
/maps/MapboxMapOptions;)V:
invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
3 errors; aborting

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 04, 2018 Oct 04, 2018

Copy link to clipboard

Copied

This was screenshot I took back on 5/7/2017 right using AIRSDK v25.
I was able to sign and package the app without problem.

If you have dx tool failed during packaging the only working solution is by set explicitly JAVA_HOME to JDK8 BEFORE you sign your app.
That simple.

WHy??
Because adt.jar and sooo many .jars outthere still INCOMPATIBLE with JDK 9+ , in which we know JDK 9 and above has radical change on its own architecture.

SO if you have multiple Java installation, please explicitly SET  JAVA_HOME to Java 8 firstair timestamp is working.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 27, 2018 Oct 27, 2018

Copy link to clipboard

Copied

java version "1.8.0_181"

our java_home set to this.

i think current air sdk doest not support java8 featured jars

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 27, 2019 Feb 27, 2019

Copy link to clipboard

Copied

Problem solved here after an edit of "adt.bat" inside of "bin" directory of sdk.

Simply change "@java" to the jre64 install dir, as showed in the following lines

original
@java -jar "%~dp0\..\lib\adt.jar" %*

changed
C:\DEV\Java\jre8-64\bin\java.exe -jar "%~dp0\..\lib\adt.jar" %*

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 12, 2019 Sep 12, 2019

Copy link to clipboard

Copied

Hello, I have the same problem generating apk on air 25+ SDK versions in Flash Professional CS6. I have done these procedures and not yet solved. Air SDK 24- I can generate the apk. Any more tips?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

LATEST

hello man, but we try to change this address on the JRE, but the error changes to dont find the jar file... its so frustrating....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines