Won't compile: error pdflatex -synctex=1 -interaction=nonstopmode %.tex

I'm new to LaTeX and I haven't succesfully compiled my code to a pdf-file yet. I have both MiKTeX and Texmaker installed but when I try to compile, a window pops up with the message:

'Could not start the command. pdflatex -synctex=1 -interaction=nonstopmode %.tex'.

The code I try to compile is:

\documentclass{article}
\begin{document}
Test.
\end{document}


I have seen multiple people here with the same question, but I haven't found an answer that works. Anybody an idea on how to solve this?