Beginning in 1322 there was a major conflict between Louis of Bavaria, the king, not emperor, of the Holy Roman Empire, and Pope John XXII.
Louis, who was taking advice from Marsilius of Padua, did not yield to any orders from the pope. You see Marsilius was highly against the church having any authority over anything, he greatly encouraged Louis to ignore the pope. As you can probably imagine pope John did not like this at all which lead to excommunications and many arguments from both sides. Louis was eventually replaced as king for Charles IV of Bohemia in 1346 and died a year after his replacement.