Both nail products contain volatile chemicals that evaporate away, hence your nail polish dries. If one layer is not fully dry, i.e. all the solvent has not evaporated, it will cause the next layer above it to bubble.
Just make sure you put on thin layers (two thin layers are always better than one thick) and make sure it's fully dry before applying the next layer.