虽然Minecraft通常可以顺利运行,但偶尔会出现一些错误。其中之一是“无法下载文件,文件内容与预期不同”错误消息。
如果您目前正在处理这个故障,那么您来对地方了。在本文中,我们将讨论导致此错误的原因以及 5 种修复方法。

是什么导致“无法下载文件”错误
当您在Windows PC上打开Minecraft 启动器时,有时会出现“无法下载文件”错误消息。(Minecraft Launcher)当启动器尝试更新Minecraft时,会弹出一条消息,阻止您玩游戏。

与每个故障一样,可能有多种原因,可能需要进行一些故障排除才能找到确切原因。潜在原因包括:
- 一个过时的启动器。Minecraft视频游戏的Java 版(Java Edition)通过Minecraft Launcher应用程序打开。如果这是过时的,或者文件已损坏,下载过程可能会受到阻碍。
- 不兼容的Minecraft模组。安装模组后偶尔会出现此Minecraft错误。(Minecraft)这可能是由于安装不正确、与Minecraft版本不兼容或在安装过程中损坏的 mod 文件。
- 防火墙(Firewall)限制。防火墙旨在保护您的系统免受可疑网络活动的侵害。不幸的是,它有时会错误地将合法应用程序识别为恶意应用程序。当Minecraft Launcher发生这种情况时,您会收到“无法下载文件”错误消息。
这里有 6 种方法来修复“无法下载文件”故障。
1.手动下载丢失(Missing)的文件
出现此错误后修复Minecraft的最简单方法是按照错误消息本身中的说明进行操作。
“无法下载文件”错误消息包含丢失文件的名称(在“磁盘上的文件名(Filename)”旁边)、可以从中下载文件
的URL以及文件在驱动器上所需的位置。(URL)
手动检索文件:
- 复制错误消息中的URL并将其粘贴到网络浏览器的地址栏中。

- 让文件自动下载。
- 导航到错误消息中指定的文件资源管理器路径。(File Explorer)为此,请打开文件资源管理器(File Explorer)并将路径复制并粘贴到地址栏中。

- 将文件从“下载”文件夹传输到“文件资源管理器(File Explorer)”中的路径,必要时替换旧文件。
- 重新启动Minecraft Launcher并查看错误是否已解决。如果不是,请保留新文件并尝试以下修复。
- 删除损坏的模组
由于损坏的Minecraft 模组是导致此问题的主要原因之一,因此最好排除这种情况。为此:
- 前往位于以下路径的 .minecraft 文件夹:C:Users%username%AppDataRoaming.minecraft。

- 从 .minecraft 文件夹中删除 mods 文件夹。如果您想保留您的整合包,(modpacks)请(Make)确保将其备份到不同的位置。

- 打开Minecraft 启动器(Minecraft Launcher),看看它是否有效。
- 如果它确实有效,则您的 mod 之一导致了错误消息。您可以将每个 mod 一个接一个地添加回来,看看哪个有问题。
注意:我们建议从最新的模组开始,因为这是最有可能导致故障的模组。
2. 卸载非原版 Minecraft 启动器(Non-Vanilla Minecraft Launchers)
如果您使用非原版 Minecraft 启动器(non-vanilla Minecraft Launcher)来玩Minecraft,它可能会干扰下载过程。要检查是否是这种情况,请卸载非香草启动器(或找到已安装的文件并手动将其全部删除)。
在其他启动器不受影响的情况下,打开合法的Minecraft 启动器(Minecraft Launcher),看看它是否有效。
3.重新安装我的世界
如果以上方法都不适合您,则下一个最可能的错误原因是您的Minecraft安装已损坏。由于您不再能够强制更新Minecraft,因此重新安装是确保文件正确且最新的最简单方法。为此:
- 按开始(Press Start)并键入添加(Add)或删除程序。从列表中选择它。

- 向下滚动(Scroll)并点击Minecraft Launcher ,然后点击Uninstall。等待(Wait)该过程完成。

- 对我的世界做同样的事情。
- 导航到位于 C:/Users/%username%AppDataRoaming 的Minecraft目录并删除 .minecraft 文件夹。如果您想保留现有的游戏文件,请不要
忘记(Don)备份您的保存文件夹。(Save)

- 从官方Minecraft.net网页
下载并安装Minecraft 。

- 打开启动器并检查错误消息是否仍然出现。
注意:一些用户收到“无法更新 Minecraft Native Launcher(Unable to update the Minecraft Native Launcher) ”错误。如果您遇到这种情况,您可能必须在继续之前解决该错误。
4.通过 Microsoft Defender(Minecraft Launcher Through Microsoft Defender)允许Minecraft Launcher
Windows 防火墙(Windows Firewall)还可以阻止Minecraft 启动器(Minecraft Launcher)下载文件。要检查是否是防火墙导致错误,请按如下方式暂时禁用它:
- 右键单击“开始(Start)” ,然后单击“设置”(Settings)。

- 单击更新和安全。

- 单击 Windows 安全。

- 选择防火墙(Select Firewall)和网络保护。

- 单击专用网络。

- 关闭 Microsoft Defender 防火墙(Toggle Microsoft Defender Firewall Off),然后检查Minecraft 启动器(Minecraft Launcher)是否正常工作。

如果Launcher正常工作,则Defender有问题。下一步是在应用程序设置中将Minecraft Launcher列入白名单:
- 右键单击“开始(Start)” ,然后单击“设置”(Settings)。

- 单击更新和安全。

- 单击 Windows 安全。

- 选择防火墙(Select Firewall)和网络保护。

- 单击允许(Click Allow)应用程序通过防火墙。

- 选择更改设置。

- 单击允许另一个应用程序。

- 单击浏览(Click Browse),找到并选择Minecraft Launcher,然后单击添加(Add)。

- 选中私人(Private)旁边的框,然后单击确定。

- 尝试启动Minecraft并查看它是否能够下载文件。
注意:如果您使用Windows Defender(Windows Defender)以外的防病毒软件,请通过右键单击系统托盘中的图标并选择“禁用”选项来禁用它。接下来,查看启动器是否正常工作。如果是这样,第三方防病毒软件可能会阻止 Minecraft 下载新文件。
5. 确保 Java 设置正确
Minecraft依靠Java运行时环境来打开.JAR文件并正确运行游戏。有时,Java会出现问题,打开首选项设置不正确。要解决此问题:
- 导航(Navigate)到 C:Users%username%AppdataRoaming.minecraft。
- 右键单击扩展名为.JAR的文件并选择属性。
- 在“打开(Opens)方式”旁边,点击更改(Change)。

- 根据您的版本,选择Java、Java (™) Platform SE Binary或OpenJDK Platform Binary。要找到这些,您可能必须选择“更多应用(Apps)” 。

- 检查启动器是否能够再次下载文件。
是时候回到采矿业了
希望本指南已帮助您解决Minecraft下载文件失败的错误,并且您可以回到您在这款出色的沙盒游戏中离开的地方。如果您知道此错误消息的任何其他修复方法,请在下面的评论中告诉我们。
5 Best Ways to Fix ”Failed to Download File, the File Contents Differ” Error in Minecraft
While Minecraft usually works without a hitсh, there are a fеw errors that oсcasionally appear. One of these is the “Failed to downlоad file, the file contents differ from what wаs expected” error message.
If you’re currently dealing with this glitch, you’ve come to the right place. In this article, we’ll discuss what causes this error and 5 ways to fix it.

What Causes the “Failed to Download File” Error
The “Failed to download file” error message sometimes appears when you open the Minecraft Launcher on a Windows PC. As the launcher tries to update Minecraft, a message pops up preventing you from playing the game.

As with every glitch, there are multiple things that might be to blame, and it may take some troubleshooting to find the exact cause. Potential causes include:
- An outdated launcher. The Java Edition of the Minecraft video game is opened via the Minecraft Launcher application. If this is out of date, or the files are corrupted, the download process may be hampered.
- Incompatible Minecraft mods. This Minecraft error occasionally appears after installing a mod. This may be due to incorrect installation, incompatibility with the version of Minecraft, or mod files that became corrupted during installation.
- Firewall restrictions. The firewall is designed to protect your system from suspicious network activity. Unfortunately, it can sometimes mistakenly identify legitimate apps as malicious. When this happens with the Minecraft Launcher, you get the “Failed to download file” error message.
Here are 6 ways to fix the “Failed to download file” glitch.
1. Manually Download the Missing File
The easiest way to fix Minecraft following this error is to follow the instructions in the error message itself.
The “Failed to download file” error message contains the name of the missing file (next to “Filename on disk”), a URL from which you can download the file, and the location on your drive where the file needs to be.
To retrieve the file manually:
- Copy the URL from the error message and paste it into the address bar of your web browser.

- Let the file download automatically.
- Navigate to the File Explorer path specified in the error message. To do this, open File Explorer and copy and paste the path into the address bar.

- Transfer the file from your Downloads folder to the path in File Explorer, replacing the old file if necessary.
- Restart the Minecraft Launcher and see if the error is resolved. If not, leave the new file in place and try the following fixes.
- Remove Corrupted Mods
Since corrupt Minecraft mods are one of the main causes of this issue, it’s a good idea to rule this out. To do so:
- Head to the .minecraft folder located at the following path: C:\Users\%username%\AppData\Roaming\.minecraft.

- Remove the mods folder from the .minecraft folder. Make sure to back it up in a different location if you want to keep your modpacks.

- Open the Minecraft Launcher and see if it works.
- If it does work, one of your mods is causing the error message. You can add each mod back one-by-one to see which is at fault.
Note: We recommend starting with the most recent mod, since that’s the one most likely to be causing the glitch.
2. Uninstall Non-Vanilla Minecraft Launchers
If you’re using a non-vanilla Minecraft Launcher to play Minecraft, it may be interfering with the download procedure. To check whether this is the case, uninstall the non-vanilla launcher (or find the installed files and delete them all manually).
With the other launcher out of the way, open the legitimate Minecraft Launcher and see if it works.
3. Reinstall Minecraft
If none of the above has worked for you, the next most likely cause of the error is that your Minecraft installation is corrupted. Since you’re no longer able to force update Minecraft, reinstalling is the easiest way to ensure that the files are correct and up-to-date. To do so:
- Press Start and type Add or remove programs. Select it from the list.

- Scroll down and click Minecraft Launcher then Uninstall. Wait for the process to complete.

- Do the same for Minecraft.
- Navigate to the Minecraft directory at C:/Users/%username%\AppData\Roaming\ and delete the .minecraft folder. Don’t forget to back up your Save folder if you want to keep your existing game files.

- Download and install Minecraft from the official Minecraft.net webpage.

- Open the launcher and check whether the error message still appears.
Note: Some users receive the “Unable to update the Minecraft Native Launcher” error. If this happens to you, you may have to troubleshoot that error before moving on.
4. Allow Minecraft Launcher Through Microsoft Defender
The Windows Firewall can also prevent the Minecraft Launcher from downloading files. To check whether the firewall is causing the error, temporarily disable it as follows:
- Right-click Start and click Settings.

- Click Update & Security.

- Click Windows Security.

- Select Firewall & network protection.

- Click Private Network.

- Toggle Microsoft Defender Firewall Off, then check if the Minecraft Launcher is working as it should.

If the Launcher works properly, Defender is at fault. The next step is to whitelist the Minecraft Launcher in the app’s settings:
- Right-click Start and click Settings.

- Click Update & Security.

- Click Windows Security.

- Select Firewall & network protection.

- Click Allow an app through the firewall.

- Select Change settings.

- Click Allow another app.

- Click Browse, find and select the Minecraft Launcher, and click Add.

- Check the box next to Private then click OK.

- Try to launch Minecraft and see if it’s able to download files.
Note: If you use an antivirus other than Windows Defender, disable it by right-clicking the icon in the system tray and selecting the “disable” option. Next, see if the launcher works correctly. If it does, the third-party antivirus is likely blocking Minecraft from downloading new files.
5. Ensure Java is Set Up Correctly
Minecraft relies on a Java runtime environment to open .JAR files and run the game correctly. Occasionally, something will go wrong with Java and the opening preferences will be set up incorrectly. To fix this:
- Navigate to C:\Users\%username%\Appdata\Roaming\.minecraft.
- Right-click a file with the .JAR extension and select Properties.
- Next to “Opens With”, click Change.

- Depending on your version, select Java, Java(™) Platform SE Binary, or OpenJDK Platform Binary. To find these, you may have to select More Apps.

- Check whether the launcher is able to download files once more.
Time to Get Back to Mining
Hopefully, this guide has helped you fix the Minecraft failed-to-download file error and you can get back to where you left off in this fantastic sandbox game. If you know of any other fixes for this error message, let us know in the comments below.