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."
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.
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