New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error, Reference Project.libraries.jar not found #2

Closed
niftynei opened this Issue Jul 28, 2012 · 2 comments

Comments

Projects
None yet
1 participant
@niftynei
Copy link

niftynei commented Jul 28, 2012

Regardless of what project I run this with, I keep getting this error:

> ant debug
...
-compile-scala:
   [scalac] Scala compiler version 2.9.2 - http://scala-lang.org
   [scalac] Compiling 1 source file to android-sdks/android-examples/android-sdk/HelloActivity/bin/classes
   [scalac] Compiling 0 scala and 2 java source files to android-sdks/android-examples/android-sdk/HelloActivity/bin/classes

BUILD FAILED
android-sdks/android-examples/android-sdk/HelloActivity/build-scala.xml:35: The following error occurred while executing this line:
android-sdks/android-examples/android-sdk/HelloActivity/build-scala.xml:44: /Users/lisaneigut/android-sdks/android-examples/android-sdk/HelloActivity/${extensible.libs.classpath} does not exist.


I can't find where this reference is being set.

Running the project as release:

> ant release 
...
-compile-scala:
   [scalac] Scala compiler version 2.9.2 - http://scala-lang.org
   [scalac] Compiling 1 source file to android-sdks/android-examples/android-sdk/HelloActivity/bin/classes
   [scalac] Compiling 0 scala and 2 java source files to android-sdks/android-examples/android-sdk/HelloActivity/bin/classes

BUILD FAILED
android-sdks/android-examples/android-sdk/HelloActivity/build-scala.xml:35: The following error occurred while executing this line:
android-sdks/android-examples/android-sdk/HelloActivity/build-scala.xml:44: /Users/lisaneigut/android-sdks/android-examples/android-sdk/HelloActivity/${extensible.libs.classpath} does not exist.

For reference:
Apache Ant(TM) version 1.8.2
java version "1.6.0_33
Scala 2.9.2

OS X 10.7.4

@niftynei

This comment has been minimized.

Copy link

niftynei commented Jul 28, 2012

turns out there are significant differences between the linux and osx versions of the /android-sdk/tools/ant/build.xml.

i'm working through fixing/reconciling the differences. I'm pretty new to ant though, so it may take a while.

@niftynei

This comment has been minimized.

Copy link

niftynei commented Jul 28, 2012

FIXXED!

Turns out they named variables differently depending on what platform you're using. And failed to declare others. Here's the fix, for everyone using the OS X android SDK:

  • Add this to the top of the "build-scala.xml" file. Really, it could go anywhere.
    <!-- for mac, add extensible classpath refids -->
        <condition property="extensible.classpath"
            value="${tested.project.absolute.dir}/bin/classes"
            else=".">
            <isset property="tested.project.absolute.dir" />
        </condition>
        <condition property="extensible.libs.classpath"
            value="${tested.project.absolute.dir}/${jar.libs.dir}"
            else="${jar.libs.dir}">
            <isset property="tested.project.absolute.dir" />
        </condition>
  • Replace android.target.classpath with project.target.class.path
  • Replace project.libraries.jars with project.all.jars.path
  • Remove references to <path refid=projects.libraries.jars />

As seen here:

 48                     <fileset dir="${jar.libs.absolute.dir}" includes="*.jar" />
 49                     <path refid="project.libraries.jars" /> <!-- REMOVE THIS LINE -->
 50                     <pathelement location="${scala-library.jar}" />
 51                     <!-- include compiled resources -->
 52                     <pathelement location="${out.classes.absolute.dir}" />
 53                     <fileset dir="${extensible.libs.classpath}" includes="*.jar" />
 54                 </classpath>

That should do it, until this gets fixed/addressed at the android tools level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment