I built the code you have attached and i didn't get any errors. Can you please send the screenshot/log of the error you got.
Please go to Tools > Find new devices and check if you have any updates. Once updated try to build again and let me know if it works.
Hi,Thanks for reply
After removing data from appdata folder and reinstalling it works fine.