Skip to main content
Inspiring
December 2, 2013
Answered

Correct jar lib for android ane

  • December 2, 2013
  • 1 reply
  • 782 views

Hello.

I want to compile ane completely with ant. But there is a problem. My ane not works.

I realized experimentally that a problem in jar file: if I export jar with eclipse ide, ane works correctly. But if i compile jar with ant it not works. Both jar files look very similar and I can`t find difference.

JDK verion 1.7.0(upd.40)

This is my ant fragment:

<property name="FLEX_HOME" value="C:/Program Files (x86)/FlexSDK/4.11.0/"/>

<property name="fre.lib" value="${FLEX_HOME}/lib/android/FlashRuntimeExtensions.jar" />

<property name="android.lib" value="C:/Program Files (x86)/Android SDK/sdk/platforms/android-10/android.jar" />

<target name="compile.classes" description="Compile java classes">

     <javac destdir="temp/java_classes" classpath="${fre.lib}:${android.lib}" fork="true">

          <src path="${java.classes}"/>

     </javac>

</target>

<target name="compile.jar" description="Make jar lib">

     <jar destfile="temp/libs/lib.jar">

          <fileset dir="temp/java_classes">

               <include name="**/*.class"/>

          </fileset>

     </jar>

</target>

How to compile jar lib correctly? Maybe I lost java comliler parameters?

This topic has been closed for replies.
Correct answer illuzor

Thank you for answer. It not works too.

I found solution.

Adding parameters to javac:

source="1.6" target="1.6"

It mean that ane not works with jdk 1.7

I`ll try to download jdk 1.6 and compile with.

1 reply

illuzorAuthorCorrect answer
Inspiring
December 3, 2013

Thank you for answer. It not works too.

I found solution.

Adding parameters to javac:

source="1.6" target="1.6"

It mean that ane not works with jdk 1.7

I`ll try to download jdk 1.6 and compile with.