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
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.
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.
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:
Both problems (dx and certificate) were solved.
I am using AIR 26 on Win 10.
Thank you a lot!!!! You ended my nightmare!
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.
Copy link to clipboard
Copied
AIR 26, same problem. Java version: 1.7.0_80
Copy link to clipboard
Copied
updated java to the latest 1.8 and now it works
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!
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.
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
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
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 first
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
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" %*
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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....