The strategic commodities, which are used in everything from electric vehicles and smartphones to jet engines and guided missiles, featured prominently during talks between Indian Prime Minister Narendra Modi and Japan's Sanae Takaichi in New Delhi on Thursday.
Asked about the meeting, China's foreign ministry said countries should work to "foster understanding and trust".
"Cooperation between nations... should not target or harm the interests of third parties, let alone serve as a pretext for forming exclusive cliques or stoking confrontation," spokesperson Guo Jiakun told a news conference.
The relationship between Beijing and Tokyo has become more turbulent since Takaichi suggested in November that a potential future attack on Taiwan -- the self-ruled island claimed by China -- could warrant Japanese military involvement.
Chinese authorities have responded in part by restricting flows to Japan of rare earths, a sector China dominates globally in both mining and processing.
Modi said after his talks with Takaichi that the countries had agreed to "strengthen supply chain resilience in strategic sectors such as semiconductors, quantum technologies and critical minerals".
Takaichi warned that Japan and India were facing challenges including "weaponisation of the economy and non-market policies and practices".
This week, China's commerce ministry added 20 Japanese entities to an export blacklist on the basis that they had boosted Tokyo's military capabilities.
Japan called the latest move "unacceptable and deeply regrettable", demanding its reversal.