Fix cannot start Emulator in android studio

Install Required libraries

sudo apt install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils lib64stdc++6:i386

Link library to emulator path

ln -sf /usr/lib64/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6

 

Install and use angular CLI with yarn

Install yarn package manager

curl -L https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt remove cmdtest
sudo apt install yarn

Check yarn global bin path

sudo yarn global bin

Install angular CLI

sudo yarn global add @angular/cli

Check ng command

ng --version

Set angular use yarn as default package manager

# angular 5
ng set --global packageManager=yarn
# angular 6
ng config -g cli.packageManager yarn