Debugging SpawnActor failed because no class was specified

Spawn actor function cannot find that class you specified .which means that class is not included in packaged build. head to project options ->packaging ->check cook all inside content folder