I have developed android apps in java so I have android-sdk and android-ndk in ~/AndroidStudioProjects/adt-bundle/sdk
. I have all the APIs downloaded in there, almost 6-8gb file.
But, when I typed motion android-setup
to setup android environment for RubyMotion, it downloaded sdk+ndk on its own in ~/.rubymotion-android/
. However, the process could not complete
❯ motion android-setup
Installed SDK is up-to-date.
Installed NDK is up-to-date.
[error] RUBYMOTION_ANDROID_SDK is incorrect, should be /Users/abhimanyuaryan/.rubymotion-android/sdk
add `export RUBYMOTION_ANDROID_SDK=/Users/abhimanyuaryan/.rubymotion-android/sdk` to your ~/.profile
[error] RUBYMOTION_ANDROID_NDK is incorrect, should be /Users/abhimanyuaryan/.rubymotion-android/ndk
add `export RUBYMOTION_ANDROID_NDK=/Users/abhimanyuaryan/.rubymotion-android/ndk` to your ~/.profile
So I guess the two android sdk locations are clashing with each other.
I also outputted
export RUBYMOTION_ANDROID_SDK=/Users/abhimanyuaryan/.rubymotion-android/sdk
export RUBYMOTION_ANDROID_SDK=/Users/abhimanyuaryan/.rubymotion-android/sdk
in RubyMotion .zshrc, .bash_profile, .profile
in ~
dir. But, I still get those ruby motion sdk and ndk are incorrect. I am using zsh shell instead of bash so I thought I should keep the export lines in zshrc instead of bashrc. By it didn't worked. So, I kept export lines in all files. But could get it to work.
How can I get it fixed?
The problem is with not updating RubyMotion to latest build.
Update via sudo motion update
Then update xcode to the latest build from App Store and everything should worok fine.