If you try to unlock the fastboot flashing during the development using command,
$ sudo fastboot flashing unlock
You may get an error as,
FAILED (remote: 'Flashing Unlock is not allowed')
fastboot: error: Command failed
Solution :
This error can be solved by enabling “OEM Unlock” from developer settings.
Enable Developer options.
Then visit “Settings -> System -> Developer Options” and enable “OEM unlocking”
Note : This will work only on development platforms and Android devices available in consumer market may have “oem unlocking” disabled.