function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ravi NarayananRavi Narayanan 

Salesforce Hybrid_Remote Mobile SDK - Cordova Issue

Hi Guys,

I am newbie in sf hybrid mobile app development. I am trying to develop a very basic hybrid_remote app. I installed forcedroid using npm. then i installed cordova using npm. 

But when i try to  create a new app using npm, i am getting the followinig error.
C:\Users\gssranar>forcedroid create
Enter your application type (native, hybrid_remote, or hybrid_local): hyb
ote
Enter your application name: hbd
Enter the target directory of your app: hbd
Enter the package name for your app (com.mycompany.my_app): com.hbd.com
Enter the start page for your app (only applicable for hybrid_remote apps
x/hbd
Creating a new cordova project.
Error: ENOENT, no such file or directory 'C:\Users\gssranar\hbd\hbd'

Can someone please help me with this?
venkat pvrvenkat pvr
You just create the a folder named hbd in your system and give that created folder path before creating sales force 1 mobile hybrid app

because the targeted directory must be available in hard drive before creating app.
Ravi NarayananRavi Narayanan
Thanks bro. i did that and now i am getting a different error when i try to build a cordova project :(
D:\myProjects\testingapp>cordova build android
Running command: D:\myProjects\testingapp\platforms\android\cordova\build.bat
ANDROID_HOME=C:\Users\gssranar\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_45
Running: D:\myProjects\testingapp\platforms\android\gradlew cdvBuildDebug -b D:\
myProjects\testingapp\platforms\android\build.gradle -Dorg.gradle.daemon=true

FAILURE: Build failed with an exception.

* Where:
Settings file 'D:\myProjects\testingapp\platforms\android\settings.gradle' line:
 4

* What went wrong:
A problem occurred evaluating settings 'android'.
> A path must be specified!

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 9.08 secs

D:\myProjects\testingapp\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "D:\myProjects\testingapp\platfor
ms\android\gradlew cdvBuildDebug -b D:\myProjects\testingapp\platforms\android\b
uild.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: D:\myProjects\testingapp\platforms\a
ndroid\cordova\build.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: D:\myProjects\testingapp\platforms\android\cordova\build.bat: Command fai
led with exit code 1
    at ChildProcess.whenDone (C:\Users\gssranar\AppData\Roaming\npm\node_modules
\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)