adverb
in vain; fruitlessly; to no purpose
Describes an action or effort that ends without the desired result, often with a sense of emptiness or futility.
彼の努力は空しく終わった。
His efforts ended in vain.
一日中待ったが、空しく時間だけが過ぎた。
I waited all day, but the time just passed fruitlessly.
無駄に emphasizes wastefulness or uselessness, while 空しく carries a more emotional, poetic nuance of emptiness and futility.
徒に is a more literary synonym for 'in vain', often used in formal or written contexts.
Adverbial form of the adjective 空しい/虚しい (empty, futile). The kanji 空 and 虚 both convey hollowness or vanity.