BUILD FAILED when trying to include jruby in apk

259 views
Skip to first unread message

Kosmas Chatzimichalis

unread,
Nov 6, 2012, 6:44:36 AM11/6/12
to rub...@googlegroups.com
Following the instructions here:

https://github.com/ruboto/ruboto/wiki/FAQ

to include jruby in apk, so users do not have to download the ruboto-core package, after instaling the jruby-jars gem, I get a build error when tyring to make a new package with rake.
Any ideas?

running rake with --trace I get the following:


-----
BUILD FAILED
/home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:850: The following error occurred while executing this line:
/home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:852: The following error occurred while executing this line:
/home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:864: The following error occurred while executing this line:
/home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:266: null returned: 137

Total time: 7 minutes 59 seconds
rake aborted!
Command failed with status (1): [ant debug...]
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `create_shell_runner'
org/jruby/RubyProc.java:270:in `call'
org/jruby/RubyProc.java:220:in `call'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:43:in `sh'
/home/vagrant/Prog/android_data/projects/sharoo1/rakelib/ruboto.rake:403:in `build_apk'
/home/vagrant/Prog/android_data/projects/sharoo1/rakelib/ruboto.rake:161:in `(root)'
org/jruby/RubyProc.java:270:in `call'
org/jruby/RubyProc.java:220:in `call'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:203:in `execute'
org/jruby/RubyArray.java:1615:in `each'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/home/vagrant/.rvm/rubies/jruby-1.6.7.2/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
org/jruby/RubyArray.java:1615:in `each'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/home/vagrant/.rvm/rubies/jruby-1.6.7.2/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
org/jruby/RubyArray.java:1615:in `each'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/home/vagrant/.rvm/rubies/jruby-1.6.7.2/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
org/jruby/RubyArray.java:1615:in `each'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/bin/rake:33:in `(root)'
org/jruby/RubyKernel.java:1058:in `load'
/home/vagrant/.rvm/gems/jruby-1.6.7.2@global/gems/rake-0.9.2.2/bin/rake:19:in `'
org/jruby/RubyKernel.java:1083:in `eval'
/home/vagrant/.rvm/gems/jruby-1.6.7.2/bin/ruby_noexec_wrapper:14:in `(root)'
-----

donV

unread,
Nov 7, 2012, 5:09:58 AM11/7/12
to rub...@googlegroups.com
Hi Kosmas!


On Tuesday, November 6, 2012 12:44:36 PM UTC+1, Kosmas Chatzimichalis wrote:
Following the instructions here:

https://github.com/ruboto/ruboto/wiki/FAQ

to include jruby in apk, so users do not have to download the ruboto-core package, after instaling the jruby-jars gem, I get a build error when tyring to make a new package with rake.
Any ideas?

running rake with --trace I get the following:

Could you post the full output in a gist/pastie ?
 

Kosmas Chatzimichalis

unread,
Nov 7, 2012, 7:54:08 AM11/7/12
to rub...@googlegroups.com
Hi donV,

thanks for having a look.

Here's the gist

https://gist.github.com/4031373

Could it have something to do with different jruby versions, as my rvm installed version is 1.6.72?

Reformatting jruby-stdlib-1.7.0.jar..../lib/ruby : no such file or directory
Done.
JRuby version is now: 1.7.0

I have tried uninstalling the jruby-jars and instaleld them again specifying the 1.6.7.2 version (gem install jruby-jars --version 1.6.7.2)
here's the new gist:

https://gist.github.com/4031440

But possibly is this line here?
Reformatting jruby-stdlib-1.6.7.2.jar..../lib/ruby : no such file or directory


and get the following

Uwe Kubosch

unread,
Nov 8, 2012, 4:53:18 AM11/8/12
to rub...@googlegroups.com
On 2012-11-07, at 13:54, Kosmas Chatzimichalis <kos...@gmail.com> wrote:

> thanks for having a look.

Gad to help.

> Here's the gist
>
> https://gist.github.com/4031373
>
> Could it have something to do with different jruby versions, as my rvm installed version is 1.6.72?

Not sure what the error is, yet.

> Reformatting jruby-stdlib-1.7.0.jar..../lib/ruby : no such file or directory

This is clearly significant. What is your ruboto version? What does "ruboto --version" output?


--
Uwe Kubosch
http://ruboto.org/



Kosmas Chatzimichalis

unread,
Nov 8, 2012, 4:57:26 AM11/8/12
to rub...@googlegroups.com


On Thursday, November 8, 2012 10:53:53 AM UTC+1, donV wrote:
On 2012-11-07, at 13:54, Kosmas Chatzimichalis <kos...@gmail.com> wrote:

> thanks for having a look.

Gad to help.

Thanks again.

> Here's the gist
>
> https://gist.github.com/4031373
>
> Could it have something to do with different jruby versions, as my rvm installed version is 1.6.72?

Not sure what the error is, yet.

> Reformatting jruby-stdlib-1.7.0.jar..../lib/ruby : no such file or directory

This is clearly significant.  What is your ruboto version?  What does "ruboto --version" output?

version 0.8.1

Uwe Kubosch

unread,
Nov 8, 2012, 5:03:57 AM11/8/12
to rub...@googlegroups.com
On 2012-11-08, at 10:57, Kosmas Chatzimichalis <kos...@gmail.com> wrote:

> > Reformatting jruby-stdlib-1.7.0.jar..../lib/ruby : no such file or directory
>
> This is clearly significant. What is your ruboto version? What does "ruboto --version" output?
>
> version 0.8.1

Could you try with Ruboto 0.9.0 ?

--
Uwe Kubosch
u...@kubosch.no
http://kubosch.no/




Kosmas Chatzimichalis

unread,
Nov 8, 2012, 5:21:27 AM11/8/12
to rub...@googlegroups.com
No, similar results with 0.9.0

Uninstalled 0.8.1 and installed 0.9.0.

when trying to use rake to compile got similar error:

----
-dex:
      [dex] Found new input file
      [dex] Converting compiled files and external libraries into /home/vagrant/Prog/android_data/projects/test/bin/classes.dex...
       [dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
       [dx] (org.joda.time.DateTimeZone$1) that doesn't come with an
       [dx] associated EnclosingMethod attribute. This class was probably produced by a
       [dx] compiler that did not target the modern .class file format. The recommended
       [dx] solution is to recompile the class from source, using an up-to-date compiler
       [dx] and without specifying any "-target" type options. The consequence of ignoring
       [dx] this warning is that reflective operations on this class will incorrectly
       [dx] indicate that it is *not* an inner class.


BUILD FAILED
/home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:850: The following error occurred while executing this line:
/home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:852: The following error occurred while executing this line:
/home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:864: The following error occurred while executing this line:
/home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:266: null returned: 137

Total time: 4 minutes 24 seconds

rake aborted!
Command failed with status (1): [ant debug...]
------

Uwe Kubosch

unread,
Nov 8, 2012, 8:26:31 AM11/8/12
to rub...@googlegroups.com
On 2012-11-08, at 11:21, Kosmas Chatzimichalis <kos...@gmail.com> wrote:

> No, similar results with 0.9.0
>
> Uninstalled 0.8.1 and installed 0.9.0.

OK, so the bug is still there.

> when trying to use rake to compile got similar error:
>
> ----
> -dex:
> [dex] Found new input file
> [dex] Converting compiled files and external libraries into /home/vagrant/Prog/android_data/projects/test/bin/classes.dex...
> [dx] warning: Ignoring InnerClasses attribute for an anonymous inner class
> [dx] (org.joda.time.DateTimeZone$1) that doesn't come with an
> [dx] associated EnclosingMethod attribute. This class was probably produced by a
> [dx] compiler that did not target the modern .class file format. The recommended
> [dx] solution is to recompile the class from source, using an up-to-date compiler
> [dx] and without specifying any "-target" type options. The consequence of ignoring
> [dx] this warning is that reflective operations on this class will incorrectly
> [dx] indicate that it is *not* an inner class.

This part is not significant, and it is expected. It is gone with JRuby 1.7.0. Maybe you can try with jruby-jars 1.7.0 ?

> BUILD FAILED
> /home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:850: The following error occurred while executing this line:
> /home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:852: The following error occurred while executing this line:
> /home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:864: The following error occurred while executing this line:
> /home/vagrant/Downloads/android-sdk-linux/tools/ant/build.xml:266: null returned: 137
>
> Total time: 4 minutes 24 seconds
> rake aborted!
> Command failed with status (1): [ant debug…]

Do you still get the previous error (Reformatting jruby-stdlib-1.7.0.jar..../lib/ruby : no such file or directory) ?

Kosmas Chatzimichalis

unread,
Nov 14, 2012, 6:21:44 AM11/14/12
to rub...@googlegroups.com
Just had another try with jruby 1.7.0 and jruby-jars 1.7.0

The previous error has gone but still cannot compile the package.

Anything obvious in the gist here: https://gist.github.com/4071610 ?

Uwe Kubosch

unread,
Nov 14, 2012, 10:23:57 AM11/14/12
to rub...@googlegroups.com
On 2012-11-14, at 12:21, Kosmas Chatzimichalis <kos...@gmail.com> wrote:

> Just had another try with jruby 1.7.0 and jruby-jars 1.7.0
>
> The previous error has gone but still cannot compile the package.

OK, new and improved error :)

> Anything obvious in the gist here: https://gist.github.com/4071610 ?

I can't anything besides that ANT returns exit code 137 in tools/ant/build.xml line 266.

Not to lead you around trying any new version, but Android SDK Tools 21 and Android SDK Platform-tool 16 were just released. Could you try upgrading?

Kosmas Chatzimichalis

unread,
Nov 15, 2012, 9:07:37 AM11/15/12
to rub...@googlegroups.com
Hi Uwe,

Thanks a lot for your help.

I've tried again and it seems to be working now!

I had to remove the android-sdk-linux folder and install the new one and also run android update sdk to include the versions I needed.

So at the moment it's working with the following:

  • vagrant@precise64:~/Prog/android_data/projects/test$ ruby -v
    jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on OpenJDK 64-Bit Server VM 1.7.0_09-b30 [linux-amd64]
  • vagrant@precise64:~/Prog/android_data/projects/test$ gem list

    *** LOCAL GEMS ***

    arrayfields (4.7.4)
    bouncy-castle-java (1.5.0146.1)
    bundler (1.2.1)
    chronic (0.6.7)
    fattr (2.2.1)
    jruby-jars (1.7.0)
    jruby-launcher (1.0.15 java)
    jruby-openssl (0.7.7)
    main (4.8.1)
    map (5.1.0)
    rake (10.0.0)
    ruboto (0.9.0)
    rubygems-bundler (1.1.0)
    rvm (1.11.3.5)
  • -check-env:
     [checkenv] Android SDK Tools Revision 21
     [checkenv] Installed at /home/vagrant/Downloads/android-sdk-linux
  • dex:
          [dex] input: /home/vagrant/Prog/android_data/projects/test/bin/classes
          [dex] input: /home/vagrant/Downloads/android-sdk-linux/tools/support/annotations.jar
          [dex] input: /home/vagrant/Prog/android_data/projects/test/libs/jruby-core-1.7.0.jar
          [dex] input: /home/vagrant/Prog/android_data/projects/test/libs/dexmaker20120305.jar
          [dex] input: /home/vagrant/Prog/android_data/projects/test/libs/jruby-stdlib-1.7.0.jar
          [dex] input: /home/vagrant/Prog/android_data/projects/test/libs/dx.jar
          [dex] Using Pre-Dexed annotations-4f6c26b8bf66a0dcd262288870be4057.jar <- /home/vagrant/Downloads/android-sdk-linux/tools/support/annotations.jar
          [dex] Pre-Dexing /home/vagrant/Prog/android_data/projects/test/libs/jruby-core-1.7.0.jar -> jruby-core-1.7.0-7b49a9a601daadc63c97e6042a614156.jar
          [dex] Using Pre-Dexed dexmaker20120305-dbd549a143797faac27fb88e5bb9131d.jar <- /home/vagrant/Prog/android_data/projects/test/libs/dexmaker20120305.jar
          [dex] Pre-Dexing /home/vagrant/Prog/android_data/projects/test/libs/jruby-stdlib-1.7.0.jar -> jruby-stdlib-1.7.0-a851936d71aafa2afc7f53fb657bd799.jar
          [dex] Pre-Dexing /home/vagrant/Prog/android_data/projects/test/libs/dx.jar -> dx-7989f498afff12cc75139dbcaf78bc7f.jar

  •       [dex] Found new input file
          [dex] Converting compiled files and external libraries into /home/vagrant/Prog/android_data/projects/test/bin/classes.dex...
  •        [dx] Merged dex A (28 defs/106.9KiB) with dex B (2 defs/1.1KiB). Result is 30 defs/128.4KiB. Took 0.2s
           [dx] Result compacted from 9808.5KiB to 7769.4KiB to save 2039.1KiB
           [dx] Merged dex A (30 defs/128.4KiB) with dex B (7741 defs/7658.5KiB). Result is 7771 defs/7769.4KiB. Took 1.7s
           [dx] Result compacted from 10507.3KiB to 8335.1KiB to save 2172.2KiB
           [dx] Merged dex A (7771 defs/7769.4KiB) with dex B (426 defs/574.4KiB). Result is 8197 defs/8335.1KiB. Took 0.6s
           [dx] Result compacted from 11322.1KiB to 8905.4KiB to save 2416.7KiB
           [dx] Merged dex A (8197 defs/8335.1KiB) with dex B (450 defs/646.9KiB). Result is 8647 defs/8905.4KiB. Took 0.6s

Thanks a lot again!!

donV

unread,
Nov 15, 2012, 4:11:21 PM11/15/12
to rub...@googlegroups.com
On Thursday, November 15, 2012 3:07:37 PM UTC+1, Kosmas Chatzimichalis wrote:
Thanks a lot for your help.
I've tried again and it seems to be working now!
I had to remove the android-sdk-linux folder and install the new one and also run android update sdk to include the versions I needed.
... 
Thanks a lot again!!

No problem!  Glad to hear it is working for you now.

Reply all
Reply to author
Forward
0 new messages