<!-- Describe the issue -->
I created a new empty encrypted wallet and used walletpassphrase to unlock it and used importprivkey to import my private key. Then I found that I still cannot create a new address. After entering getnewaddress, I get the error message "Error: This wallet has no available keys (code -4)".
<!--- What behavior did you expect? -->
I expected that I can create a new address.
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
'Create a new receiving address' is greyed out.
<!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->
I used Bitcoin Core v0.21.0 downloaded from bitcoin.org, I got the error message in the console of Bitcoin Core GUI.
<!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->
Windows 10.0.19042, Intel i7-4720HQ, HDD