1

I'm trying to go through "Trailhead Native Android" and I'm getting stuck in the first chapter on "forcedroid create". the error I'm getting from the command line is "forcedroid create failed Command failed: git clone --branch v5.0.0 --single-branch --depth 1 --recurse-submodules https://github.com/forcedotcom/SalesforceMobileSDK-Templates C:\Users\Owner\Documents\Android project\tmp84510\SalesforceMobileSDK-Templates Too many arguments."

2
  • "If you use forcedroid, you’re not required to clone the GitHub repo." – TSmith Dec 14 '16 at 22:31
  • When I use the forcdroid command and follow the prompts it tries copying the repo on its own. – user8310 Dec 15 '16 at 9:23
0

forcedroid is the package for Android installation. Salesforce publishes a Node Packaged Module (npm) package to help you create Mobile SDK apps and you use the npm script to install Mobile SDK and to create projects.

Your best bet here is to follow the steps provided by Salesforce for installing Node.js to use the Mobile SDK npm installers. Once you have that installed you can go ahead and install the forcedroid utility as follows.

Mac OS X (or other non-Windows environments)—In a terminal window, type:

sudo npm install forcedroid -g

Windows—At the Windows command prompt, type:

npm install forcedroid -g

Once complete, you can create your Android project.

1
  • I'm having trouble figuring it out. I ran npm install forcedroid -g. now what. How do I create a new project with salesforce connectivity capabilities. And if I already have an existing android project, how would I add the required libraries etc. to add salesforce functionality to an existing project? – user8310 Dec 15 '16 at 9:45
0

I just ran into the same problem and looks like the issue is with the long directory path.

I chose a shorter one like C:\My Project and it installed fine.

Also make sure you have the last NPM installed.

Node Package Manager (npm) 3.10 or later—Must be installed for all Android development scenarios, including direct access to the SalesforceMobileSDK-Android repo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.