2 Replies Latest reply on Jan 17, 2014 11:45 AM by MIke Elston

    Android build fails (Rhodes 4.0.0, Mac OS X 10.9)

    MIke Elston

      I am having trouble building for Android. So far I have tried: reinstalling gems, reinstalling Android SDK & NDK also Created a new project `rhogen app test` which fails. iOS build work fine

      I was unable to find if a specific version of Android SDK/NDK is required for rhodes.

      The first error appears to start at `arm-linux-androideabi-g++: fatal error: no input files`

      I've posted the rake output in the following GIST https://gist.github.com/indstry/bd0e5f3fb7ca33a3bf1e


      System Version: OS X 10.9.1 (13B42)
      Kernel Version: Darwin 13.0.0

      ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin13.0.0]


      • rhodes (4.0.0)
      • rhoelements (4.0.0)


      • export ANDROID_SDK_ROOT=/Users/melston/bin/android/android-sdk_r22.3
      • export ANDROID_HOME=/Users/melston/bin/android/android-sdk_r22.3
      • export ANDROID_NDK_ROOT=/Users/melston/bin/android/android-ndk-r9c
      • export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home

      java version "1.7.0_45"
      Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
      Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

        • Re: Android build fails (Rhodes 4.0.0, Mac OS X)
          MIke Elston

          I was able to get android builds to work inside my windows VM. and have some more troubleshooting details.

          I did not mention this before but I am NOT using RhoStudio, I use Sublimetext and command line.  I installed the gems manually from the RMS dmg. And I use rbenv to manage my ruby environments.


          It appears that at some point during the build process it ignores my environmental variables and starts using the system installed ruby and not my rbenv installed ruby


          running rake device:android:production --trace shows as part of the trace



          /Users/melston/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/rhodes-4.0.0/lib/commonAPI/coreapi/ext/platform/android/Rakefile:48:in `block in <top (required)>'

          /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rake/task.rb:228:in `call'

          /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rake/task.rb:228:in `block in execute'

          /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rake/task.rb:223:in `each'

          /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rake/task.rb:223:in `execute'

          /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rake/task.rb:166:in `block in invoke_with_call_chain'

          /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize’

          calling /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/...

          is what comes with Mac OS X 10.9.  the rhodes gems are not installed system wide, only installed in my 1.9.3 rbenv gemset

          • Re: Android build fails (Rhodes 4.0.0, Mac OS X 10.9)
            MIke Elston

            I found a workaround for Mac OS X 10.9

            the system installed ruby is in fact interfering with the rake tasks.  doing the following has allowed me to build,  though this may cause problems with any ruby apps that rely on the system rake command


            1. change dir to `cd /usr/bin`
            2. rename system rake command for backup `sudo mv rake rake2`
            3. symlink rbenv rake shim `sudo ln -s /Users/melston/.rbenv/shims/rake rake`


            Android builds now succeeded.