[Tex/LaTex] \printbibliography not doing anything

biblatextexstudio

I'm relatively new to latex, and I'm trying to get a test bibliography working. I'm just going through the sharelatex section on biblatex (https://www.sharelatex.com/learn/Bibliography_management_with_biblatex) and am just running their example code. However, instead of showing a few lines of text with citations within and then a list of references, I only get the text with citations. The list of references is not shown at all.

I'm using TexStudio, if that means anything.

The code in question is as follows:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{biblatex}
\addbibresource{sample.bib}

\begin{document}
    Let's cite! The Einstein's journal paper \cite{einstein} and the Dirac's 
    book \cite{dirac} are physics related items. 

    \printbibliography

\end{document}

and sample.bib contains:

@article{einstein,
author =       "Albert Einstein",
title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal =      "Annalen der Physik",
volume =       "322",
number =       "10",
pages =        "891--921",
year =         "1905",
DOI =          "http://dx.doi.org/10.1002/andp.19053221004",
keywords =     "physics"
}

@book{dirac,
title={The Principles of Quantum Mechanics},
author={Paul Adrien Maurice Dirac},
isbn={9780198520115},
series={International series of monographs on physics},
year={1981},
publisher={Clarendon Press},
keywords = {physics}
}

@online{knuthwebsite,
author    = "Donald Knuth",
title     = "Knuth: Computers and Typesetting",
url       = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
keywords  = "latex,knuth"
}

@inbook{knuth-fa,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
publisher = "Addison-Wesley",
year = "1973",
chapter = "1.2",
keywords  = "knuth,programming"
}

EDIT:
Just to clarify,
Actual Output
Output
Expected Output
Expected Output

EDIT 2:

Adding biber as the default bibliography still gives the same output, but also gives the following messages:

    Process started: biber.exe "test"

Use of uninitialized value $llabel in concatenation (.) or string at C:\Users\~\AppData\Local\Temp\par-5072696d617263682d4956\cache-6bef6bfac2f8155f13b160f6720d3dbe6a10b684\inc\lib/Biber.pm line 675.

Use of uninitialized value in string eq at C:\Users\~\AppData\Local\Temp\par-5072696d617263682d4956\cache-6bef6bfac2f8155f13b160f6720d3dbe6a10b684\inc\lib/Biber/SortLists.pm line 77.

INFO - This is Biber 1.8
INFO - Logfile is 'test.blg'
INFO - Reading 'test.bcf'
WARN - Warning: Found biblatex control file version 2.7, expected version 2.5
INFO - Found 2 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'sample.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'sample.bib'

Process exited with error(s)

With bibtex it gives the following:

    Process started: bibtex.exe "test"

This is BibTeX, Version 0.99d (MiKTeX 2.9)
The top-level auxiliary file: test.aux
I found no \citation commands---while reading file test.aux
I found no \bibdata command---while reading file test.aux
I found no \bibstyle command---while reading file test.aux
(There were 3 error messages)

Best Answer

Update packages (I was using MikTex as a package manager), and then remove the cache as explained here. Compile, compile bibliography, recompile and build. Thanks to Aubrey Blumsohn and moewe.

Related Question