This error will be occured only when you are working with Sanbox solutions.
Cause for the issue :
This is because all the sandbox solution will work under SPUserCodeV4 process.
By default this process will be not active. If you want to work with Sandbox solutions you need to manually start this service or you can do the same with Scripting also.
Solution :
Here is the solution to start the service from Central administration
Go to
Central Asministartion -> System Settings -> Services on Server -> Activate the service Microsoft SharePoint Foundation Sandboxed Code Service