Skip to content
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

Android support #41

Open
awernick opened this issue Jan 16, 2015 · 4 comments
Open

Android support #41

awernick opened this issue Jan 16, 2015 · 4 comments

Comments

@awernick
Copy link

Using the latest build from Package Installer, SublimeRubyMotionBuilder keeps complaining about the android.sdk_path not pointing to a valid Android SDK directory. Running rake commands works without any hiccup, and I have insured that my launchd.conf config contains the instruction to add the PATH variable.

Using OSX Yosemite and latest RubyMotion

Error Message:

ERROR! app.sdk_path should point to a valid Android SDK directory.
[Finished in 0.9s]

Launchd.conf:

setenv PATH /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/awernick/.rvm/gems/ruby-2.1.5/bin:/usr/bin:/usr/sbin:/bin:/usr/local/bin:/sbin:/opt/x11/bin:/Users/awernick/.rbenv/shims:/Users/awernick/.rvm/gems/ruby-2.2.0/bin:/Users/awernick/.rvm/gems/ruby-2.2.0@global/bin:/Users/awernick/.rvm/rubies/ruby-2.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/msp430-toolchain/bin:/Users/awernick/.rvm/bin:/Users/awernick/android-rubymotion/sdk:/Users/awernick/android-rubymotion/ndk
setenv RUBYMOTION_ANDROID_NDK /Users/awernick/android-rubymotion/ndk
setenv RUBYMOTION_ANDROID_SDK /Users/awernick/android-rubymotion/sdk

RUBYMOTION_ANDROID_NDK variable

Alans-MacBook-Air:~ awernick$ $RUBYMOTION_ANDROID_NDK
-bash: /Users/awernick/android-rubymotion/ndk: is a directory

RUBYMOTION_ANDROID_SDK variable

Alans-MacBook-Air:~ awernick$ $RUBYMOTION_ANDROID_SDK
-bash: /Users/awernick/android-rubymotion/sdk: is a directory

PATH variable

Alans-MacBook-Air:~ awernick$ $PATH
-bash: /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/awernick/.rvm/gems/ruby-2.1.5/bin:/usr/bin:/usr/sbin:/bin:/usr/local/bin:/sbin:/opt/x11/bin:/Users/awernick/.rbenv/shims:/Users/awernick/.rvm/gems/ruby-2.2.0/bin:/Users/awernick/.rvm/gems/ruby-2.2.0@global/bin:/Users/awernick/.rvm/rubies/ruby-2.2.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/msp430-toolchain/bin:/Users/awernick/.rvm/bin:/Users/awernick/android-rubymotion/sdk:/Users/awernick/android-rubymotion/ndk: No such file or directory
@awernick
Copy link
Author

I was able to find a solution for my problem. Apparently OSX Yosemite does not set enviornment variables through Launch.d anymore. A work around was to use launchctl to set the necessary variables, although this is only for the current session and will be wiped after a reboot.

To set the environment variables in Yosemite use

launchctl setenv RUBYMOTION_ANDROID_NDK $RUBYMOTION_ANDROID_NDK
launchctl setenv RUBYMOTION_ANDROID_SDK $RUBYMOTION_ANDROID_SDK

then close SublimeText and MotionBuilder should work correctly.

@Watson1978
Copy link
Member

Now, not support Android platform.

@Watson1978 Watson1978 changed the title RubyMotionBuilder does not detect PATH env Android support Jan 17, 2015
@trekr5
Copy link

trekr5 commented Nov 30, 2015

Hi,

I'm experiencing this error when i run rake device:

ERROR! app.sdk_path should point to a valid Android SDK directory. Run 'motion android-setup' to install the latest SDK version.

when i attempt to create an android application using RubyMotion on a mac. I've tried the awernick answer and still receive the same error.

@gregogalante
Copy link

Someone know how to solve the problem? I found that $RUBYMOTION_ANDROID_SDK is not set on my Mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants