20 Replies Latest reply on Nov 2, 2014 4:00 AM by Babatunde Oyeyemi

    How do I build rhomobile apps

    Babatunde Oyeyemi

      I'm new to using Rhomobile to build a cross-platform mobile apps. However, the instructions given in the docs to build app using command line seems a bit complicated as non of thos commands work on my CMD. Do I need to install something else to run any of those commands? Please help.

        • Re: How do I build rhomobile apps

          For local building basic steps are following:

          1. cd to directory were app directory will be placed

          2. generate app template with command rhodes app MyApp, where MyApp is name of your app

          3. cd to MyApp folder

          4. build app for you target platform
               android - build and run app on device with command rake run:android:device
               iPhone - build app with command rake device:iphone:production. It is necessary provide additional settings in build.yml (Rhomobile | Building for iOS)

            • Re: How do I build rhomobile apps
              Babatunde Oyeyemi

              Thank you USER05925 for your response. When I did as you mentioned for android, I got the followings:

               

               

              E:\Mobile\RhoMobile WS\RhoMobileApplication>rake run:android:device

              C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:93: warning: alr

              eady initialized constant OPT_TABLE

              C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1268: warning: a

              lready initialized constant S_IF_DOOR

              C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1496: warning: a

              lready initialized constant DIRECTORY_TERM

              C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1500: warning: a

              lready initialized constant SYSCASE

              C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1619: warning: a

              lready initialized constant LOW_METHODS

              C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1625: warning: a

              lready initialized constant METHODS

              1.9.3

              $app_config['extensions'] : ["coreapi", "json", "rhoconnect-client"]

              $app_config['capabilities'] : []

              Missing or invalid 'android' section in rhobuild.yml: 'C:/android-sdk-windows'

               

               

              What should I do?

                • Re: How do I build rhomobile apps

                  > Missing or invalid 'android' section in rhobuild.yml: 'C:/android-sdk-windows'

                  Incorrect path to android sdk/ndk and(or) android sdk/ndk are not installed in system.


                  1. It needs install android SDK and NDK (You could find more information here - Rhomobile | Native SDK Setup) and Java if it required

                  2. Launch rhodes-setup and set pathes.

                    • Re: How do I build rhomobile apps
                      Babatunde Oyeyemi

                      Hi USER05925, I really appreciate you helping me out on this. Thanks a lot. However, I did as you said but I still get this error:

                       

                      E:\Mobile\RhoMobile WS\RhoMobileApplication>rake run:android:device

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:93: warning: alr

                      eady initialized constant OPT_TABLE

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1268: warning: a

                      lready initialized constant S_IF_DOOR

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1496: warning: a

                      lready initialized constant DIRECTORY_TERM

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1500: warning: a

                      lready initialized constant SYSCASE

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1619: warning: a

                      lready initialized constant LOW_METHODS

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1625: warning: a

                      lready initialized constant METHODS

                      1.9.3

                      $app_config['extensions'] : ["coreapi", "json", "rhoconnect-client"]

                      $app_config['capabilities'] : []

                      No Android platform found at SDK path: 'E:/Mobile/Android/android-sdk'

                       

                      Is there anything else I need to do? All I want to do is to generate the .apk file for android and run it manually on android device.

                • Re: How do I build rhomobile apps
                  Daniel Silva

                  It looks like you have a space in the path to your workspace.  "RhoMobile WS" .  Not sure if this is causing your problem, but this will cause issues.

                    • Re: How do I build rhomobile apps
                      Babatunde Oyeyemi

                      I've updated the folder name but doesn't change anything

                       

                       

                      E:\Mobile\RhoMobileWS\RhoMobileApplication>rake run:android:device

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:93: warning: alr

                      eady initialized constant OPT_TABLE

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1268: warning: a

                      lready initialized constant S_IF_DOOR

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1496: warning: a

                      lready initialized constant DIRECTORY_TERM

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1500: warning: a

                      lready initialized constant SYSCASE

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1619: warning: a

                      lready initialized constant LOW_METHODS

                      C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/1.9.1/FileUtils.rb:1625: warning: a

                      lready initialized constant METHODS

                      1.9.3

                      $app_config['extensions'] : ["coreapi", "json", "rhoconnect-client"]

                      $app_config['capabilities'] : []

                      No Android platform found at SDK path: 'E:/Mobile/Android/android-sdk'

                        • Re: How do I build rhomobile apps
                          Daniel Silva

                          in E:/Mobile/Android/android-sdk on your machine, do you have folder structure like this?  If so, do you have anything in the platforms folder?

                          09/28/2014  08:15 PM    <DIR>          add-ons

                          08/07/2014  03:45 PM    <DIR>          build-tools

                          08/08/2014  04:56 AM    <DIR>          extras

                          08/07/2014  03:44 PM    <DIR>          platform-tools

                          09/26/2014  09:26 PM    <DIR>          platforms

                          09/26/2014  09:11 PM    <DIR>          samples

                          08/07/2014  11:41 PM    <DIR>          sources

                          09/26/2014  09:17 PM    <DIR>          system-images

                          09/26/2014  09:24 PM    <DIR>          temp

                          08/20/2014  09:58 AM    <DIR>          tools

                            • Re: How do I build rhomobile apps
                              BHAKTA RANJAN SATAPATHY

                              Hi,

                               

                              Open sdkmanager.exe and update your android-sdk version.

                               

                              If you are getting no platforms found, there might be chance that your platform folder is empty.

                              Could you please recheck, what’s inside your android-sdk platform folder?

                               

                              Thanks

                              • Re: How do I build rhomobile apps
                                Babatunde Oyeyemi

                                Yes correct, I have all those folders in there.

                                In the Platform folder, I have:

                                 

                                 

                                and each folder with the followings:

                                 

                                  • Re: How do I build rhomobile apps
                                    Daniel Silva

                                    You have your path for the sdk set to 'E:/Mobile/Android/android-sdk'   it should be 'E:/Mobile/Android/android-sdk/sdk'

                                      • Re: How do I build rhomobile apps
                                        Babatunde Oyeyemi

                                        Thanks a lot for catching this. I think I'm getting closer to getting this done. I updated it and now it runs but with another error:

                                         

                                        rhodes-4.1.1/lib/commonAPI/coreapi/public/api/jquery-2.0.2-rho-custom.min.js", "

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/co

                                        mmonAPI/coreapi/public/api/rhoapi.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/

                                        ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/generated/Rho

                                        .Application.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/

                                        rhodes-4.1.1/lib/commonAPI/coreapi/public/api/generated/Rho.Database.js", "C:/Mo

                                        torolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonA

                                        PI/coreapi/public/api/generated/Rho.Database.SQLite3.js", "C:/MotorolaRhoMobileS

                                        uite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/publi

                                        c/api/generated/Rho.Intent.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/ge

                                        ms/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/generated/Rho.Log.js

                                        ", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/li

                                        b/commonAPI/coreapi/public/api/generated/Rho.NativeMenubar.js", "C:/MotorolaRhoM

                                        obileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi

                                        /public/api/generated/Rho.NativeTabbar.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby

                                        /lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/generate

                                        d/Rho.NativeToolbar.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.

                                        1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/generated/Rho.Navbar.js", "

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/co

                                        mmonAPI/coreapi/public/api/generated/Rho.Network.js", "C:/MotorolaRhoMobileSuite

                                        4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/ap

                                        i/generated/Rho.NewORM.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1

                                        .9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/generated/Rho.NewORMMode

                                        l.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.

                                        1/lib/commonAPI/coreapi/public/api/generated/Rho.Notification.js", "C:/MotorolaR

                                        hoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/core

                                        api/public/api/generated/Rho.Push.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/

                                        ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/generated/Rho

                                        .RhoFile.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhod

                                        es-4.1.1/lib/commonAPI/coreapi/public/api/generated/Rho.System.js", "C:/Motorola

                                        RhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/cor

                                        eapi/public/api/generated/Rho.System.Process.js", "C:/MotorolaRhoMobileSuite4.1.

                                        1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/ge

                                        nerated/Rho.WebView.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.

                                        1/gems/rhoconnect-client-4.1.1/lib/../ext/rhoconnect-client/public/api/generated

                                        /Rho.RhoConnectClient.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.

                                        9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/Rho.Application.js", "C:/

                                        MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commo

                                        nAPI/coreapi/public/api/Rho.Database.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/l

                                        ib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/Rho.NewORM

                                        Helper.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes

                                        -4.1.1/lib/commonAPI/coreapi/public/api/rhoapi-native.all.js"]

                                        !!!MODIFY E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/tmp/assets/apps/public/

                                        api/rhoapi-modules.js

                                        extjsmodulefiles_opt=["C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/g

                                        ems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/Rho.ORM.js", "C:/MotorolaRhoMo

                                        bileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/

                                        public/api/Rho.ORMHelper.js", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems

                                        /1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/public/api/Rho.Ruby.RunTime.js"]

                                        !!!MODIFY E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/tmp/assets/apps/public/

                                        api/rhoapi-modules-ORM.js

                                        end of init extension

                                        cd C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1

                                        cp -rp E:/Mobile/RhoMobileWS/RhoMobileApplication/app E:/Mobile/RhoMobileWS/RhoM

                                        obileApplication/bin/tmp/assets/apps

                                        cd E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/tmp/assets/apps

                                        cd E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/tmp/assets/lib/res

                                        rm back_btn.wm.png

                                        rm blue_pushpin.wm.png

                                        rm blue_pushpin_small.wm.png

                                        rm callout.wm.png

                                        rm callout_link.wm.png

                                        rm esri.wm.png

                                        rm forward_btn.wm.png

                                        rm home_btn.wm.png

                                        rm minimize_btn.wm.png

                                        rm options_btn.wm.png

                                        rm refresh_btn.wm.png

                                        rm sip_btn.wm.png

                                        rm back_btn.win32.png

                                        rm blue_pushpin.win32.png

                                        rm callout.win32.png

                                        rm callout_link.win32.png

                                        rm esri.win32.png

                                        rm forward_btn.win32.png

                                        rm home_btn.win32.png

                                        rm minimize_btn.win32.png

                                        rm options_btn.win32.png

                                        rm refresh_btn.win32.png

                                        rm sip_btn.win32.png

                                        rm back_btn.wp.png

                                        rm blue_pushpin_small.wp.png

                                        rm callout.wp.png

                                        rm callout_link.wp.png

                                        rm esri.wp.png

                                        rm forward_btn.wp.png

                                        rm home_btn.wp.png

                                        rm options_btn.wp.png

                                        rm refresh_btn.wp.png

                                        rm back_btn.wp8.png

                                        rm blue_pushpin_small.wp8.png

                                        rm callout.wp8.png

                                        rm callout_link.wp8.png

                                        rm forward_btn.wp8.png

                                        rm home_btn.wp8.png

                                        rm minimize_btn.wp8.png

                                        rm options_btn.wp8.png

                                        rm refresh_btn.wp8.png

                                        rm sip_btn.wp8.png

                                        cd E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/tmp/assets

                                        cd E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/tmp/assets/apps

                                        cd C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1

                                        cp lib/build/compileERB/default.rb E:/Mobile/RhoMobileWS/RhoMobileApplication/bi

                                        n/tmp/assets

                                        Running default.rb

                                         

                                        rm E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/tmp/assets/default.rb

                                        cp lib/build/compileRB/compileRB.rb E:/Mobile/RhoMobileWS/RhoMobileApplication/b

                                        in/tmp/assets

                                        Running compileRB

                                         

                                        cd E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/tmp/assets

                                        rm apps/app/application.rb

                                        rm apps/app/helpers/application_helper.rb

                                        rm apps/app/helpers/browser_helper.rb

                                        rm apps/app/Settings/controller.rb

                                        rm apps/app/test/model_test_spec.rb

                                        rm compileRB.rb

                                        rm lib/base64.rb

                                        rm lib/bsearch.rb

                                        rm lib/date/format.rb

                                        rm lib/date.rb

                                        rm lib/dateOrig.rb

                                        rm lib/indifferent_access.rb

                                        rm lib/json/common.rb

                                        rm lib/json/pure/generator.rb

                                        rm lib/json/pure.rb

                                        rm lib/json/version.rb

                                        rm lib/json.rb

                                        rm lib/newrhom/newrhom.rb

                                        rm lib/newrhom/newrhom_model.rb

                                        rm lib/newrhom/newrhom_object_factory.rb

                                        rm lib/ostruct.rb

                                        rm lib/rational.rb

                                        rm lib/rational18.rb

                                        rm lib/rbconfig.rb

                                        rm lib/rho/mapview.rb

                                        rm lib/rho/render.rb

                                        rm lib/rho/rho.rb

                                        rm lib/rho/rhoapplication.rb

                                        rm lib/rho/rhobluetooth.rb

                                        rm lib/rho/rhocontact.rb

                                        rm lib/rho/rhocontroller.rb

                                        rm lib/rho/rhoerror.rb

                                        rm lib/rho/rhoevent.rb

                                        rm lib/rho/rhoevent_bb.rb

                                        rm lib/rho/rhoevent_c.rb

                                        rm lib/rho/rhomsg.rb

                                        rm lib/rho/rhonativeviewmanager.rb

                                        rm lib/rho/rhosupport.rb

                                        rm lib/rho/rhotabbar.rb

                                        rm lib/rho/rhotoolbar.rb

                                        rm lib/rho/rhoutils.rb

                                        rm lib/rho/rhoviewhelpers.rb

                                        rm lib/rho.rb

                                        rm lib/RhoApplicationApi.rb

                                        rm lib/rhoappmanifest.rb

                                        rm lib/RhoConnectClient.rb

                                        rm lib/RhoDatabaseApi.rb

                                        rm lib/rhodes.rb

                                        rm lib/rhoframework.rb

                                        rm lib/rholang/lang_en.rb

                                        rm lib/rholang/lang_es.rb

                                        rm lib/rholang/localization_simplified.rb

                                        rm lib/rholang/rhoerror_de.rb

                                        rm lib/rholang/rhoerror_en.rb

                                        rm lib/rholang/rhoerror_es.rb

                                        rm lib/rholang/rhomsg_de.rb

                                        rm lib/rholang/rhomsg_en.rb

                                        rm lib/rholang/rhomsg_es.rb

                                        rm lib/rholang/rhomsg_it.rb

                                        rm lib/RhoLogApi.rb

                                        rm lib/rhom/rhom.rb

                                        rm lib/rhom/rhom_model.rb

                                        rm lib/rhom/rhom_object.rb

                                        rm lib/rhom/rhom_object_factory.rb

                                        rm lib/rhom/rhom_source.rb

                                        rm lib/rhom.rb

                                        rm lib/rhomotoapi.rb

                                        rm lib/RhoNativeMenubarApi.rb

                                        rm lib/RhoNativeTabbarApi.rb

                                        rm lib/RhoNativeToolbarApi.rb

                                        rm lib/RhoNetworkApi.rb

                                        rm lib/RhoNotificationApi.rb

                                        rm lib/RhoPushApi.rb

                                        rm lib/rhosystem.rb

                                        rm lib/RhoSystemApi.rb

                                        rm lib/rhosystem_wp8.rb

                                        rm lib/RhoWebViewApi.rb

                                        rm lib/singleton.rb

                                        rm lib/stringio.rb

                                        rm lib/time.rb

                                        rm lib/version.rb

                                        rm apps/app/gameOver.erb

                                        rm apps/app/index.erb

                                        rm apps/app/layout.erb

                                        rm apps/app/Settings/err_sync.erb

                                        rm apps/app/Settings/home.erb

                                        rm apps/app/Settings/index.erb

                                        rm apps/app/Settings/login.erb

                                        rm apps/app/Settings/reset.erb

                                        rm apps/app/Settings/wait.erb

                                        cd C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1

                                        cp -r platform/shared/db/res/db E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/t

                                        mp/assets/db

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/co

                                        mmonAPI/coreapi is configuring...

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/co

                                        mmonAPI/coreapi/ext.yml is processing...

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/co

                                        mmonAPI/coreapi/ext.yml is processed

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/co

                                        mmonAPI/coreapi is configured

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/ex

                                        tensions/json is configuring...

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/ex

                                        tensions/json is configured

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhoconnect-client-4

                                        .1.1/lib/../ext/rhoconnect-client is configuring...

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhoconnect-client-4

                                        .1.1/lib/../ext/rhoconnect-client/ext.yml is processing...

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhoconnect-client-4

                                        .1.1/lib/../ext/rhoconnect-client/ext.yml is processed

                                        C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhoconnect-client-4

                                        .1.1/lib/../ext/rhoconnect-client is configured

                                        Extensions' java source lists: {"C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/ge

                                        ms/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi"=>"C:/MotorolaRhoMobileSuite4.1

                                        .1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/ext/platform

                                        /android/ext_java.files", "C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9

                                        .1/gems/rhoconnect-client-4.1.1/lib/../ext/rhoconnect-client"=>"C:/MotorolaRhoMo

                                        bileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhoconnect-client-4.1.1/lib/../ext/

                                        rhoconnect-client/ext/platform/android/ext_java.files"}

                                        {"audio"=>false, "camera"=>false, "gps"=>false, "network_state"=>true, "phone"=>

                                        false, "pim"=>false, "record_audio"=>false, "vibrate"=>false, "bluetooth"=>false

                                        , "calendar"=>false, "sdcard"=>false, "push"=>false, "motorola"=>false, "motorol

                                        adev"=>false, "webkit_browser"=>false, "shared_runtime"=>false, "motorola_browse

                                        r"=>false, "hardware_acceleration"=>false}

                                        No need to regenerate genconfig.h

                                        Building coreapi: ["C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems

                                        /rhodes-4.1.1/lib/commonAPI/coreapi/ext/platform/android", "rake"]

                                        Build extension (arm): coreapi

                                        --------------------------------------------------------------------------------

                                         

                                        PWD: C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/l

                                        ib/commonAPI/coreapi/ext/platform/android

                                        rake arch:arm

                                        cd ../../..

                                        rake aborted!

                                        ←[31mCompilation failed: ext/shared/generated/application_ruby_api.c←[0m

                                         

                                        Tasks: TOP => arch:arm => E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/target/

                                        android/release/extensions/coreapi/armeabi/libcoreapi.a => E:/Mobile/RhoMobileWS

                                        /RhoMobileApplication/bin/tmp/coreapi/arm/application_ruby_api.c.o

                                        (See full trace by running task with --trace)

                                        NDK sysroot: E:/Mobile/Android/android-ndk-r10c/platforms/android-21/arch-arm

                                        --------------------------------------------------------------------------------

                                         

                                        PWD: C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/l

                                        ib/commonAPI/coreapi

                                        E:/Mobile/Android/android-ndk-r10c/toolchains/arm-linux-androideabi-4.6/prebuilt

                                        /windows-x86_64/bin/arm-linux-androideabi-gcc.exe --sysroot E:/Mobile/Android/an

                                        droid-ndk-r10c/platforms/android-21/arch-arm -fPIC -Wall -Wextra -Wno-sign-compa

                                        re -Wno-unused -mandroid -DANDROID -DOS_ANDROID -DRHO_DEBUG -g -O1 -fstack-prote

                                        ctor-all -D_DEBUG -Winit-self -Wshadow -Wcast-align -Wvla -Wstack-protector -I"C

                                        :/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/com

                                        monAPI/coreapi/ext/platform/android/generated/jni" -I"C:/MotorolaRhoMobileSuite4

                                        .1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/lib/commonAPI/coreapi/ext/platfo

                                        rm/android/../../shared" -I"C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.

                                        9.1/gems/rhodes-4.1.1/platform/android/Rhodes/jni/include" -I"C:/MotorolaRhoMobi

                                        leSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/platform/android/Rhodes/

                                        jni/include/rhodes/details" -I"C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems

                                        /1.9.1/gems/rhodes-4.1.1/platform/shared/ruby/include" -I"C:/MotorolaRhoMobileSu

                                        ite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/platform/shared" -I"C:/Motor

                                        olaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/platform/share

                                        d/common" -I"C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes

                                        -4.1.1/platform/shared/api_generator" -I"E:/Mobile/RhoMobileWS/RhoMobileApplicat

                                        ion/bin/tmp/include" -I"C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/

                                        gems/rhodes-4.1.1/platform/shared/ruby" -I"C:/MotorolaRhoMobileSuite4.1.1/ruby/l

                                        ib/ruby/gems/1.9.1/gems/rhodes-4.1.1/platform/shared/ruby/android" -I"C:/Motorol

                                        aRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/platform/shared/

                                        ruby/generated" -c "ext/shared/generated/application_ruby_api.c" -o "E:/Mobile/R

                                        hoMobileWS/RhoMobileApplication/bin/tmp/coreapi/arm/application_ruby_api.c.o"

                                        In file included from C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/ge

                                        ms/rhodes-4.1.1/platform/shared/ruby/include/ruby/ruby.h:25:0,

                                                         from C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/ge

                                        ms/rhodes-4.1.1/platform/shared/ruby/include/ruby.h:32,

                                                         from ext/shared/generated/application_ruby_api.c:1:

                                        ←[31mC:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-4.1.1/p

                                        latform/shared/ruby/android/ruby/config.h:308:24: fatal error: asm/page.h: No su

                                        ch file or directory

                                        ←[0mcompilation terminated.

                                        rake aborted!

                                        Extension build failed: C:/MotorolaRhoMobileSuite4.1.1/ruby/lib/ruby/gems/1.9.1/

                                        gems/rhodes-4.1.1/lib/commonAPI/coreapi/ext/platform/android

                                         

                                        Tasks: TOP => run:android:device => device:android:debug => package:android => b

                                        uild:android:all => build:android:rhobundle => build:android:extensions

                                        (See full trace by running task with --trace)

                                         

                                        ====================================

                                        Also, will building using "rake run:android:device" generate the .apk file? If yes, where can I locate it?

                                          • Re: How do I build rhomobile apps
                                            Daniel Silva

                                            See this thread.  I think you have the same issue.  Might need to change NDK to an older version.  I am running r10b and I do not see this issue.

                                            Re: Compilation Error building for Android

                                              • Re: How do I build rhomobile apps
                                                Babatunde Oyeyemi

                                                I couldnt get some previous versions of NDK. I was able to find r9 and r10. r9 generated the .apk file but with some errors. So when I try to install the .apk file on a device, it says it's invalid.

                                                see part of the error below:

                                                 

                                                Building APK file...

                                                PWD: E:/Mobile/Android/android-sdk/sdk/tools

                                                CMD: "C:/Program Files/Java/jdk1.8.0/bin/java.exe" -Xmx1024m -classpath E:/Mobil

                                                e/Android/android-sdk/sdk/tools/lib/sdklib.jar com.android.sdklib.build.ApkBuild

                                                erMain E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/target/android/1-tmp.apk -

                                                z E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/rhodes.ap_ -f E:/Mobile/RhoMobi

                                                leWS/RhoMobileApplication/bin/classes.dex

                                                 

                                                THIS TOOL IS DEPRECATED. See --help for more information.

                                                 

                                                Align Debug APK file

                                                rake aborted!

                                                No such file or directory - E:/Mobile/Android/android-sdk/sdk/tools/zipalign.exe

                                                -f -v 4 E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/target/android/1-tmp.apk

                                                E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/target/android/1-debug.apk

                                                 

                                                Tasks: TOP => run:android:device => device:android:debug

                                                (See full trace by running task with --trace)

                                                =======================================

                                                 

                                                Can you share with me your version of NDK? I cant find anywhere to download it.

                                                  • Re: How do I build rhomobile apps
                                                    Daniel Silva

                                                    I think your NDK is probably OK now, but for some reason google keeps moving files around.  As you can see, we are looking for zipalign.exe here.

                                                    E:/Mobile/Android/android-sdk/sdk/tools/zipalign.exe 

                                                    Which is where is used to be.  In the latest SDKs, they moved it under build-tools, so you can just copy it from there back to tools as a workaround.  I believe we have updated where we are looking for this in 5.0.

                                                    So copy the file from  E:/Mobile/Android/android-sdk/sdk/build-tools/Some Android Platform/zipalign.exe to E:/Mobile/Android/android-sdk/sdk/tools/zipalign.exe



                                                      • Re: How do I build rhomobile apps
                                                        Babatunde Oyeyemi

                                                        Thanks for pointing me to that. However, when I copied the file to the said location, this happened:

                                                         

                                                        Building APK file...

                                                        PWD: E:/Mobile/Android/android-sdk/sdk/tools

                                                        CMD: "C:/Program Files/Java/jdk1.8.0/bin/java.exe" -Xmx1024m -classpath E:/Mobil

                                                        e/Android/android-sdk/sdk/tools/lib/sdklib.jar com.android.sdklib.build.ApkBuild

                                                        erMain E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/target/android/1-tmp.apk -

                                                        z E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/rhodes.ap_ -f E:/Mobile/RhoMobi

                                                        leWS/RhoMobileApplication/bin/classes.dex

                                                         

                                                        THIS TOOL IS DEPRECATED. See --help for more information.

                                                         

                                                        Align Debug APK file

                                                        rm -rf E:/Mobile/RhoMobileWS/RhoMobileApplication/bin/target/android/1-tmp.apk

                                                        search for adb logcat to kill ========================================

                                                        Loading package...

                                                        CMD: E:/Mobile/Android/android-sdk/sdk/platform-tools/adb.exe -d install -r E:/M

                                                        obile/RhoMobileWS/RhoMobileApplication/bin/target/android/1-debug.apk

                                                        error: device not found

                                                        - waiting for device -

                                                         

                                                        ========================================

                                                        and it waited forever (about 4 hours) before I decided to abort it.

                                                        I was thinking it was waiting for an android device to install the generated "1-debug.apk" file and couldnt find but even when I tried to install the file myself, it says the apk file is invalid.

                                                          • Re: How do I build rhomobile apps
                                                            Daniel Silva

                                                            The waiting for 4 hours part sounds like adb did not connect to your device.  You need to be able to get your device to show up when you type adb devices at the command line.

                                                            Android Debug Bridge | Android Developers

                                                             

                                                            Depending on what your device is, you may need to load some drivers on your PC.  If it is a Motorola Solutions device, you will need our drivers.

                                                            https://portal.motorolasolutions.com/Support/US-EN/Resolution?solutionId=95914

                                                             

                                                            The invalid apk problem might be that you don't have "Allow apps from unknown sources" checked on your device.

                                                            See the bottom of this page:

                                                            Publishing Overview | Android Developers

                                                              • Re: How do I build rhomobile apps
                                                                Babatunde Oyeyemi

                                                                I'm still having problem installing, giving me invalid apk. Even when I build a signed production version, still same error. I also tried installing the apk file manually, I still get the same invalid error message. Could it be something wrong with the Android SDK and NDK version I'm using?

                                                                If possible, could you please upload your version of Android SDK and NDK for me to download and use please?

                                                                  • Re: How do I build rhomobile apps
                                                                    Daniel Silva

                                                                    I don't think it would be a problem with the SDK or NDK.

                                                                     

                                                                    What is the device you are trying to load it on?  What version of Android is on that device?  Some carriers do not allow non market apps to be installed, so it may be that, or maybe the app is being built with a newer minimum version than you device has.

                                                                     

                                                                    If you now have adb working, you could do adb install myappname.apk   at the command line from the folder where the apk file is on your pc.  Sometimes that will show you an error you didn't see in a log.  You could also then do adb logcat to see what's in the logs on the device when the install fails.

                                                                     

                                                                    Have you tried running this app on the Android Emulator?

                                                                     

                                                                    If you want to attach the apk, I will try it here on one of my devices.

                                                                      • Re: How do I build rhomobile apps
                                                                        Babatunde Oyeyemi

                                                                        I guess the problem isnt about SDK or NDK like you said but the naming convention.

                                                                         

                                                                        I named the app, "1" and it generates 1-debug.apk which gives error while installing. But when I changed the name to something alphabitic or alphanumeric like "Rho1", it works and installs fine.

                                                                        Is there any restrictions on naming conventions in RhoMobile?

                                                                  • Re: How do I build rhomobile apps
                                                                    Jon Tara

                                                                    error: device not found

                                                                    - waiting for device -

                                                                     

                                                                    I've found that it sometimes helps to simply unplug and re-plug the USB cable when this happens.

                                                                     

                                                                    While I mostly work with iOS, I've experienced this with Galaxy Tab 2s and almost half the time I have to unplug and re-plug the USB cable, or perhaps wait to plug it in until after you get the waiting message.