Q.My apricot tree blooms but does not give fruit, why?
At the bottom of stem some gum is secreted. There is also white substance.
Certified GKH Gardening Expert
It's hard to answer without knowing more about the growing conditions, soil and water management. Here is an article with some information and possibilities.
https://www.gardeningknowhow.com/edible/fruits/apricots/apricot-tree-not-fruiting.htm
The gummosis is common in apricots and can be a result of a fungus disease or environmental stress.
If the white substance is powdery and on both sides of the leaves it may be powdery mildew. That also can stop fruit set. I've included an article about that as well.
https://www.gardeningknowhow.com/edible/fruits/fegen/treating-fruit-tree-powdery-mildew.htm
https://www.gardeningknowhow.com/edible/fruits/apricots/apricot-tree-growing.htm
https://www.gardeningknowhow.com/edible/fruits/apricots/diseases-of-apricots.htm