代码之家  ›  专栏  ›  技术社区  ›  Ras

flatter-android.os.ParcelableException:java.io.IOException:仅请求内部,但空间不足

  •  0
  • Ras  · 技术社区  · 6 年前

    我想在第一次的时候就跑。 flutter doctor 要验证我的安装,请执行以下操作:

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.12.6 16G29, locale en-ID)
    [✓] Android toolchain - develop for Android devices (Android SDK 27.0.1)
    [✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
    [✓] Android Studio (version 3.1)
    [✓] VS Code (version 1.27.2)
    [✓] Connected devices (1 available)
    
    • No issues found!
    

    我的安装似乎没有问题,但如果我运行 flutter run 命令,我得到一个错误:

    Launching lib/main.dart on Android SDK built for x86 in debug mode...
    Initializing gradle...                                       4.0s
    Resolving dependencies...                                   86.8s
    Running 'gradlew assembleDebug'...                          34.2s
    Built build/app/outputs/apk/debug/app-debug.apk.
    Installing build/app/outputs/apk/app.apk...                  0.3s
    Error: ADB exited with exit code 1
    adb: failed to install /Users/build/app/outputs/apk/app.apk:
    Exception occurred while executing:
    android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
            at android.util.ExceptionUtils.wrap(ExceptionUtils.java:34)
            at com.android.server.pm.PackageInstallerService.createSession(PackageInstallerService.java:406)
            at com.android.server.pm.PackageManagerShellCommand.doCreateSession(PackageManagerShellCommand.java:2415)
            at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:907)
            at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:158)
            at android.os.ShellCommand.exec(ShellCommand.java:103)
            at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21260)
            at android.os.Binder.shellCommand(Binder.java:634)
            at android.os.Binder.onTransact(Binder.java:532)
            at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2796)
            at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.ja
    Error launching application on Android SDK built for x86.
    

    有没有人像我一样犯过错误?

    1 回复  |  直到 6 年前
        1
  •  10
  •   Javier Vasquez    5 年前

    但是没有足够的空间=手机上没有空间,卸载一些应用程序,仅此而已

        2
  •  2
  •   Msmkt    5 年前

    另一个选项是打开已配置的emulator并增加分配的内存。

    在Android Studio中,转到:
    AVD Manager -&燃气轮机; Edit this AVD -&燃气轮机; Show Advanced Settings Memory and Storage 增加 Internal Storage SD Card .

    希望能有帮助