I got this error while trying to deploy an App in SharePoint 2013. The full error message is
Error occurred in deployment step 'Install App for SharePoint': Failed to install App for SharePoint
Follow the the Steps Given below
Create an isolated app domain on your development computer
Microsoft has provided also some PowerShell commmand to configure your SharePoint (link).
Start the SharePoint 2013 Management Shell.
Create your isolated app domain your apps, for example "apps.developement.local".
Ensure that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running.
Verify that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running.
You must specify a farm admin account under which the SPSubscriptionService and AppManagementServiceInstance services will run. This farm admin account must be an SPManagedAccount. If your farm admin is not an SPManagedAccount, you can create a SPManagedAccount with your farm admin credentials by typing the following command in the SharePoint Management Shell (You will be prompted for the farm admin domain\user and password).
Specify a farm admin account, application pool, and database settings for the SPSubscriptionService and AppManagementServiceInstance services.
Specify your tenant name by typing the following code in the SharePoint Management Shell.
Check if the App Management Service and Subscription Service are started. You can use the following PowerShell to start them:
If they already are started, you will get the following warnings: