SAN FRANCISCO — A federal judge in San Jose has dismissed a group of consolidated privacy class actions that claimed that Apple Inc. and eight other defendants let advertisers track mobile device users’ activity without permission.

U.S. District Judge Lucy Koh granted the motions to dismiss Tuesday, with leave to amend, finding that plaintiffs didn’t show that they’d been harmed, or how defendants’ actions had allegedly harmed them. “In fact,” Koh wrote, “plaintiffs fail to differentiate among the eight mobile industry defendants making it impossible to decipher, based on the current allegations, any causal chain.”