I had this issue for a while as well. I found a correct solution and @Rakesh is pretty right on this part. But the explanation is not complete.
first my theme did not show up. of course i had the have the correct Registration.php and Theme.xml file.
After a
php bin/magento setup:upgrade
my theme showed up in the back-end
Then the static content deploy failed with this message
[InvalidArgumentException]
Vendor/custom_theme argument has invalid value, available themes are: Magento/blank, Magento/luma
I had to the entire directory structure ready
etc
-view.xml
media
-preview.png
registration.php
theme.xml
web
-css
-fonts
-images
-js
But still. then i added the logo.svg to the web/images folder and a less file to the css folder and Boom all worked perfectly now!