【问题标题】:How to fix broken android studio emulator after moving sdk directory移动 sdk 目录后如何修复损坏的 android studio 模拟器
【发布时间】:2026-01-11 20:45:02
【问题描述】:

移动我的 sdk 文件后,我的 android 应用程序出现以下错误:

01:42   Emulator: libpng warning: iCCP: known incorrect sRGB profile

01:42   Emulator: qemu-system-i386.exe: -drive if=none,overlap-check=none,cache=unsafe,index=0,id=system,file=C:\Users\My\.android\avd\Pixel_2_API_22.avd\system.img.qcow2,read-only,l2-cache-size=1048576: Could not open backing file: Could not open 'C:\Users\My\AppData\Local\Android\Sdk/system-images\android-22\google_apis\x86\/system.img': The system cannot find the path specified.

01:42   Emulator: Process finished with exit code 0

如何解决这个问题?

【问题讨论】:

    标签: android android-studio android-emulator


    【解决方案1】:

    错误提示:

    Could not open 'C:\Users\My\AppData\Local\Android\Sdk/system-images\android-22\google_apis\x86\/system.img'
    

    看起来它要么是路径本身,要么是 URI 中正反斜杠字符的混合,这是无效的。看起来这是适用于 Windows 的。 Java 将处理非此即彼的问题,但是……最好只使用正斜杠(而不是 Windows 反斜杠,因为这是字符串中的转义字符)。

    例如:C:/Users/My/AppData/Local/Android/Sdk/system-images/android-22/google_apis/x86/system.img

    尝试通过调用{File}.canRead()isFile() 来验证Java File 实例(创建具有给定路径的File 对象)。

    【讨论】: