1

I'm trying to build a package using rake run:android and I get the error No such file or directory - ./apkbuilder

My project setup is given below:

rhodes-3.5.1.12 ndk version: ndk-r8b 32 bit sdk version: android 4.2.2 API 17

I'd tried with 4.3 API 18 but it's not working.

To reach upto this point I'd copied the file aapt in to platform-tools also created a lib directory in platform-tools and put the dx.lib in it.

I'd tried with different combinations. Rhodes 3.4.2, ndk-r9 64 bit and 32 bit. Only ndk-r8 32 bit is working for me. Could anyone tell me what is the problem here?

Or a working combination of sdk, ndk and rhodes?

I've fixed the issue. Added a new answer below.

coder247
  • 2,913
  • 19
  • 50
  • 70

4 Answers4

2

The problem of the missing apkbuilder.bat is not coming from the Android NDK but from the Android SDK. Google, in build tools r22 moved some files in different directory, breaking rhodes and a lot of other Android tools.

You've different options:

  1. Use RhoMobile Suite v4.0
  2. Stick to RhoMobile Suite v.2.2 downloading the latest v3.5 rhodes gem from github (using the 3-5-stable branch).
  3. Use Android SDK build tools r21

more information are available on Launchpad, the RhoMobile community site by Motorola Solutions.

pfmaggi
  • 6,116
  • 22
  • 43
  • Tried with RhoMobile Suite v4.0 with rhodes-3.5.1.12, ndk-r8b 32 bit, Android 4.0.3 API 15. But the result is same. – coder247 Oct 10 '13 at 08:17
  • 1
    RhoMobile Suite v4.0 includes rhodes-4.0. If you're using rhodes-3.5.1.12 (that is not even the latest v3.5 release) you don't have the fixes to handle the new Android build tools. – pfmaggi Oct 10 '13 at 14:19
  • Could you tell me where is rhodes-4.0 located? So that I can configure my build.yml – coder247 Oct 10 '13 at 17:04
  • 1
    If you install RhoMobile Suite v4.0 on windows, you get the rhodes-4.0.0 in the folder: C:\MotorolaRhoMobileSuite4.0.0\ruby\lib\ruby\gems\1.9.1\gems\rhodes-4.0.0 as an alternative you can get the rhodes v4.0 source from github and build the gem from there – pfmaggi Oct 10 '13 at 18:45
  • forgot to say that I use mac – coder247 Oct 10 '13 at 18:52
  • 1
    on the mac, using the suggested rvm environment, you are expected to have your ruby gem at ~/.rvm/gems/ruby-1.9.x-pxxx/gems/rhodes-x.x.x/lib/framework as indicated in the documentation: http://docs.rhomobile.com/guide/ruby_extensions#adding-libraries-to-rhodes-framework – pfmaggi Oct 10 '13 at 19:22
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/39013/discussion-between-coder247-and-pfm) – coder247 Oct 10 '13 at 19:27
  • 3.Use Android SDK build tools r21 - That did the trick! :D Thanks a lot! – Christopher Stock Feb 13 '15 at 13:50
2

I've fixed it like this in mac os:

Use the latest versions of SDK, NDK and rhodes 4.0.0

Get rhodes like following:

git clone git://github.com/rhomobile/rhodes.git
cd rhodes
git checkout 4.0.0 
gem build rhodes.gemspec
sudo gem install rhodes-4.0.0.gem

Try to build again. If still not working send me a message, I'll try my best :)

coder247
  • 2,913
  • 19
  • 50
  • 70
  • I was unable to install the gem built using this method. Instead of 'gem build...', just running 'rake gem' worked for me. – Ellis Apr 23 '14 at 09:50
2

apkbuilder is deprecated.

THIS TOOL IS DEPRECATED and may stop working at any time! current just the batch or bash script be removed

you can just create a new apkbuilder file in android-sdk-linux/tools dir by:

window:

  copy android.bat apkbuilder.bat 
  modify apkbuilder.bat: change com.android.sdkmanager.Main to com.android.sdklib.build.ApkBuilderMain

linux or mac:

  cat android | sed -e 's/com.android.sdkmanager.Main/com.android.sdklib.build.ApkBuilderMain/g' > apkbuilder
  chmod a+x apkbuilder
lrobot
  • 21
  • 1
  • 3
0

It seems that :

  • rhodes 3.5 does not support 64 bits ndk

  • some tools are in a different path in ndk9 and rhodes 3.5 can't find them.

So you have to stick with 32 bits and ndk8 with rhodes 3.5.

Rhodes 4 should work with 64 bits and ndk9.

QuickFix
  • 11,661
  • 2
  • 38
  • 50