如何增加Android Emulator的存储空间? (INSTALL_FAILED_INSUFFICIENT_STORAGE)

时间:2010-02-10 18:26:27

标签: android android-emulator emulation avd

我有时(不经常)为我的一个项目得到这个,只有几个班级  Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

如何增加模拟器的存储空间?

20 个答案:

答案 0 :(得分:116)

更新

这个答案是,正如我写的那样,将近八岁,大约五年陈旧。但它仍然(正如我写的那样)是“接受”的答案,因为它回答了问题的问题。

适用于较新的Android Studio工具的新答案可以在这里找到:https://stackoverflow.com/a/35828035/62 - 这是一个很好的屏幕截图答案。如果您使用的是Android Studio,请忽略下面的Eclipse答案。

基于Eclipse的原始答案

我正在寻找这个问题的答案,并对上述答案不满意。但后来我找到了answer,所以这里是供将来参考:

总结(并澄清),在Eclipse中,转到“调试配置”。您可以在“调试”图标下的下拉列表中找到它。选择“目标”,然后选择要启动的首选模拟器目标。然后在“其他模拟器命令行选项”下添加:

-partition-size 1024

然后关闭模拟器(并删除所有设备),然后单击调试图标,该图标将启动您选择的首选模拟器。这很重要:Eclipse需要启动调试器,而不是AVD。

这解决了我的问题。

答案 1 :(得分:40)

将以下内容添加到avd config.ini

disk.dataPartition.size=1024MB

请告诉我这是否对您有用。

我添加了Add Data Partition Size ConfigurationScreen Shot of AVD Storage Space being increased

答案 2 :(得分:38)

在Android Studio

打开AVD Manager。

enter image description here

单击“编辑图标”以编辑AVD。

enter image description here

单击“显示高级设置”。

enter image description here

根据需要更改内部存储,Ram,SD卡大小。 单击“完成”。

enter image description here

单击是确认弹出窗口。

enter image description here

擦除AVD上的数据,然后单击是确认弹出窗口。

enter image description here

重要提示:增加尺寸后,如果它没有自动要求您擦除数据,则必须通过打开AVD的下拉菜单手动执行此操作。选择擦除数据。

enter image description here

现在启动并使用增加存储空间的模拟器。

答案 3 :(得分:15)

运行AVD Manager

选择您的AVD并点击"详情..."按钮。

在我的情况下,AVD Manager将磁盘大小设置为

//circular-menu

(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
    typeof define === 'function' && define.amd ? define(factory) :
    (global.CMenu = factory());
}(this, function () { 'use strict';

    function rotateDeg (i){
        return this.startDeg + this.rotateUnit * i;
    }

    function rotateDeg$1 (i){
        return - (this.rotateDeg(i) + this.unskewDeg);
    }

    function startDeg(config) {
        var top = -(config.totalAngle - 180) / 2,
            positions = {
                top: top,
				top1: top + 40,
				top2: top + 80,				
				top3: top + 120,	
				top4: top + 160,	
				top5: top + 200,	
				top6: top + 240,	
				top7: top + 280,	
				top8: top + 320,	
                left: top - 90,
                right: top + 90,
                bottom: top + 180
            };

        return config.start !== undefined ? config.start : positions[config.position];
    }

    const antialiasing = 3;

    function coverRadius(radius, percent) {
        var square = radius * radius * 2;
        return Math.sqrt(square) * percent + antialiasing;
    }

    function coverSize (coverRadius) {
        var l = coverRadius * 2;
        var m = -l / 2;

        l += "px";
        m += "px";
        
        return {
            width:  l,
            height: l,
            marginLeft: m,
            marginTop: m
        };
    }

    function menuSize (config) {
        var l = config.diameter;
        var m = - config.diameter / 2;

        l += "px";
        m += "px";

        return {
            width:  l,
            height: l,
            marginLeft: m,
            marginTop: m
        };
    }

    const fixedTop  = 10;

    function clickZoneSize (config) {
        var l = config.diameter;
        var m = - config.diameter / 2;

        l += "px";
        m += "px";

        return {
            width:  l,
            height: l,
            marginRight: m,
            marginBottom: m
        };
    }

    function listSize (config) {
        var l = (config.diameter / 2) + 'px';

        return {
            width:  l,
            height: l
        };
    }

    const middleRatio = 0.41;

    function textTop (clickZoneRadius) {
        return clickZoneRadius * middleRatio - fixedTop + 'px';

    }

    function Calculation(config) {
        this._config = config;

        var c = this.config = config,
            itemsNum = c.menus.length,
            spaceNumber = c.totalAngle === 360 ? itemsNum : itemsNum - 1;

        this.radius = config.diameter / 2;
        this.coverRadius = coverRadius(this.radius, config.percent);
        this.clickZoneRadius = this.radius - this.coverRadius;



        this.listSize = listSize(config);
        this.clickZoneSize = clickZoneSize(config);
        this.menuSize = menuSize(config);
        this.coverSize = coverSize(this.coverRadius);
        this.startDeg = startDeg(config);
        this.centralDeg = (c.totalAngle - (c.spaceDeg * spaceNumber)) / itemsNum;
        this.rotateUnit = this.centralDeg + c.spaceDeg;
        this.skewDeg = 90 - this.centralDeg;
        this.unskewDeg = - (90 - this.centralDeg / 2);
        this.textTop = textTop(this.clickZoneRadius);
    }

    Calculation.prototype = {
        constructor: Calculation,
        rotateDeg: rotateDeg,
        horizontalDeg: rotateDeg$1
    };

    function createLists (parent) {
        
        this._config.menus.forEach(function(v, k){

            this._createList(parent, v, k);
            
        }, this);

    }

    function defaultView(node) {
        return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
            || (node.document && node) // node is a Window
            || node.defaultView; // node is a Document
    }

    function styleRemove(name) {
        this.style.removeProperty(name);
    }

    function styleConstant(name, value, priority) {
        this.style.setProperty(name, value, priority);
    }

    function styleFunction(name, value, priority) {
        var v = value.apply(this, arguments);
        if (v == null) this.style.removeProperty(name);
        else this.style.setProperty(name, v, priority);
    }

    function style(ele, name, value, priority) {

        var node;
        return arguments.length > 1
            ? ((value == null
            ? styleRemove : typeof value === "function"
            ? styleFunction
            : styleConstant).call(ele, name, value, priority == null ? "" : priority))
            : defaultView(node = ele)
            .getComputedStyle(node, null)
            .getPropertyValue(name);
    }

    function createList(parent, data, index){

        var list = document.createElement('li');
        style(list, 'width', this._calc.listSize.width);
        style(list, 'height', this._calc.listSize.height);
        style(list, 'transform', 'rotate('+ this._calc.rotateDeg(index) +'deg) skew('+ this._calc.skewDeg +'deg)');

        parent.appendChild(list);

        this._createAnchor(list, data, index);

    }

    function classArray(string) {
        return string.trim().split(/^|\s+/);
    }

    function classList(node) {
        return node.classList || new ClassList(node);
    }

    function ClassList(node) {
        this._node = node;
        this._names = classArray(node.getAttribute("class") || "");
    }

    ClassList.prototype = {
        add: function(name) {
            var i = this._names.indexOf(name);
            if (i < 0) {
                this._names.push(name);
                this._node.setAttribute("class", this._names.join(" "));
            }
        },
        remove: function(name) {
            var i = this._names.indexOf(name);
            if (i >= 0) {
                this._names.splice(i, 1);
                this._node.setAttribute("class", this._names.join(" "));
            }
        },
        contains: function(name) {
            return this._names.indexOf(name) >= 0;
        }
    };

    function classedAdd(node, names) {
        var list = classList(node), i = -1, n = names.length;
        while (++i < n) list.add(names[i]);
    }

    function classedRemove(node, names) {
        var list = classList(node), i = -1, n = names.length;
        while (++i < n) list.remove(names[i]);
    }

    function classedTrue(names) {
        classedAdd(this, names);
    }

    function classedFalse(names) {
        classedRemove(this, names);
    }

    function classedFunction(names, value) {
        (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
    }

    function classed(ele, name, value) {
        var names = classArray(name + "");

        if (arguments.length < 2) {
            var list = classList(this), i = -1, n = names.length;
            while (++i < n) if (!list.contains(names[i])) return false;
            return true;
        }

        var callee = (typeof value === "function"
            ? classedFunction : value
            ? classedTrue
            : classedFalse).call(ele, names, value);
    }

    var UID = {
        _current: 0,
        getNew: function(){
            this._current++;
            return this._current;
        }
    };
    function styleSheet (element, prop, value, pseudo) {
        
        var _this = element;
        var _sheetId = "sheetStyles";
        var _head = document.head || document.getElementsByTagName('head')[0];
        var _sheet = document.getElementById(_sheetId) || document.createElement('style');
        _sheet.id = _sheetId;
        var className = "s-S" + UID.getNew();
        
        _this.className += " " + className;



        _sheet.innerHTML += " ." + className + ( pseudo ? (":" + pseudo) : "" ) + "{" + prop + ":" + value + "}";
        _head.appendChild(_sheet);
        return this;
    };

    function on (ele, type, callback, data) {
        ele.addEventListener(type, function(e){
            callback.call(this, e, data);
        });
    }

    function createMenu(){
        var p = this._container;

        classed(p, 'circular-menu', true);
        style(p, 'width', this._calc.menuSize.width);
        style(p, 'height', this._calc.menuSize.height);
        style(p, 'margin-top', this._calc.menuSize.marginTop);
        style(p, 'margin-left', this._calc.menuSize.marginLeft);
        
        var self = this;
        on(p, "click", function(e){
            if(e.toElement === p){
                self._cMenu.hide();
            }
        });
        setTimeout(function(){
            style(p, 'display', 'block');
        },100);

        styleSheet(p, 'width', this._calc.coverSize.width, 'after');
        styleSheet(p, 'height', this._calc.coverSize.height, 'after');
        styleSheet(p, 'margin-left', this._calc.coverSize.marginLeft, 'after');
        styleSheet(p, 'margin-top', this._calc.coverSize.marginTop, 'after');
        styleSheet(p, 'border', "3px solid " + this._config.pageBackground, 'after');


        var ul = p.appendChild(document.createElement('ul'));
        this._createLists(ul);
    }

    function hasSubMenus(menus) {
        return menus instanceof Array && menus.length !== 0;
    }
    function ifDisabled(disabled){
        if(disabled instanceof Function)
            return disabled();
        else
            return Boolean(disabled);
    }

    function setHref(ele, href){
        if(!href) return;

        if(href instanceof Object){
            ele.href = href.url;
            ele.target = href.blank? "_blank" : "";
        }else{
            ele.href = href;
        }
    }



    var delayShow = null;// delayShow reference the last setTimeout triggered by any one of menu item(anchor)

    function createAnchor (parent, data, index) {
        var self = this;

        var delayHide = null;// delayHide reference the last setTimeout triggered by the menu item itself

        var a = document.createElement('a');

        setHref(a, data.href);

        a.setDisabled = function(){
            classed(a, 'disabled', ifDisabled(data.disabled));
        };
        this._anchors.push(a);


        style(a, 'width', this._calc.clickZoneSize.width);
        style(a, 'height', this._calc.clickZoneSize.height);
        style(a, 'right', this._calc.clickZoneSize.marginRight);
        style(a, 'bottom', this._calc.clickZoneSize.marginBottom);
        style(a, 'transform', 'skew(' + -this._calc.skewDeg + 'deg) rotate(' + this._calc.unskewDeg + 'deg) scale(1)');

        classed(a, 'disabled', ifDisabled(data.disabled));


        var percent = this._config.percent * 100 + "%";
        styleSheet(a, 'background', 'radial-gradient(transparent ' + percent + ', ' + this._config.background + ' ' + percent + ')');
        styleSheet(a, 'background', 'radial-gradient(transparent ' + percent + ', ' + this._config.backgroundHover + ' ' + percent + ')', 'hover');


        function clickCallBack(e, data){
            if (data.click) data.click.call(this, e, data);

            if(self._config.hideAfterClick){
                self._cMenu.hide();
                if(self._cMenu._pMenu) self._cMenu._pMenu.hide();
                if(subMenu) subMenu.hide();
            }
        }

        on(a, 'click', clickCallBack, data);

        parent.appendChild(a);

        this._createHorizontal(a, data, index);
        
        
        //toggle subMenu
        if (hasSubMenus(data.menus)) {
            var subMenu = this._createSubMenu(self, data.menus, index);

            on(a, 'mouseenter', function () {

                delayShow = setTimeout(function () {
                    subMenu
                        .styles({
                                    top: self._container.offsetTop + self._calc.radius + 'px',
                                    left: self._container.offsetLeft + self._calc.radius + 'px'
                                })
                        .show();
                }, 150);
            });

            on(a, 'mouseleave', function (e) {
                if (!subMenu._container.contains(e.toElement)) {
                    delayHide = setTimeout(function () {
                        subMenu.hide();
                    }, 200);
                }
            });

            on(subMenu._container, 'mouseenter', function () {
                clearTimeout(delayShow);
                clearTimeout(delayHide);
            });

            on(subMenu._container, 'mouseleave', function (e) {
                if (!a.contains(e.toElement) || e.toElement.children[0] === a) {
                    subMenu.hide();
                }
            });
        }
    }

    const sizeRatio = 0.65;
    const marginTopRatio = 0.2;
    const fontHeight = 13;

    function hasIcon(icon){
        if(icon === undefined) return false;
        else if(typeof icon === "string") return icon !== "";
        else return icon.length && icon[0] !== "";
    }

    function getIcon(icon){
        return typeof icon === "string"? icon : icon[0];
    }

    function getIconColor(icon){
        return typeof icon === "string"? null : icon[1];
    }

    function createIcon (parent, data, index) {
        if(!hasIcon(data.icon)) return;

        var span = document.createElement('span');

        var icon = getIcon(data.icon),
            color = getIconColor(data.icon);

        classed(span, icon + " cm-icon", true);
        style(span, 'color', color);

        var l = this._calc.clickZoneRadius * sizeRatio - fontHeight + "px",
            m = this._calc.clickZoneRadius * marginTopRatio - fontHeight + "px";
        style(span, 'width', l);
        style(span, 'height', l);
        style(span, 'font-size', l);
        style(span, 'margin-top', m);

        parent.appendChild(span);
    }

    const withIconMarginTop = "3px";
    const withIconTop = "-3px";

    function createText (parent, data, index) {

        var span = document.createElement('span');
        span.textContent = data.title;

        classed(span, 'text', true);
        style(span, 'margin-top', hasIcon(data.icon)? withIconMarginTop : this._calc.textTop);
        style(span, 'top', hasIcon(data.icon)? withIconTop : 0);

        parent.appendChild(span);
    }

    function createHorizontal (parent, data, index) {

        var div = document.createElement('div');
        classed(div, "horizontal", true);

        if(this._config.horizontal) style(div, 'transform', 'rotate('+ this._calc.horizontalDeg(index) +'deg)');

        parent.appendChild(div);

        this._createIcon(div, data, index);
        this._createText(div, data, index);
    }

    function extend$1 () {
        // Variables
        var extended = {};
        var deep = false;
        var i = 0;
        var length = arguments.length;

        // Check if a deep merge
        if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {
            deep = arguments[0];
            i++;
        }

        // Merge the object into the extended object
        var merge = function (obj) {
            for (var prop in obj) {
                if (Object.prototype.hasOwnProperty.call(obj, prop)) {
                    // If deep merge and property is an object, merge properties
                    if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {
                        extended[prop] = extend(true, extended[prop], obj[prop]);
                    } else {
                        extended[prop] = obj[prop];
                    }
                }
            }
        };

        // Loop through each object and conduct a merge
        for (; i < length; i++) {
            var obj = arguments[i];
            merge(obj);
        }

        return extended;

    };

    const sizeRatio$1 = 5 / 3;
    const percentRatio = 0.45;
    const centralDegRatio = 0.618;


    function createSubMenu(creator, menus, index) {
        var subMenu = document.createElement('div');

        classed(subMenu, 'circular-sub-menu', true);

        this._container.parentNode.insertBefore(subMenu, this._container);

        var totalAngle = this._calc.centralDeg * centralDegRatio * menus.length;
        var startDeg = this._calc.rotateDeg(index) - totalAngle / 2 + this._calc.centralDeg / 2;

        var config = extend$1(this._config, {
            totalAngle: totalAngle,//deg,
            percent: percentRatio,//%
            diameter: this._config.diameter * sizeRatio$1,//px
            start: startDeg,//deg
            animation: "into",
            menus: menus
        });
        
        return new CMenu(subMenu, creator._cMenu)
            .config(config);
    }

    function Creator(cMenu, config){
        this._cMenu = cMenu;
        this._container = cMenu._container;
        this._config = config;
        this._calc = new Calculation(config);
        this._anchors = [];
    }


    Creator.prototype = {
        constructor: Creator,
        createMenu: createMenu,
        _createLists: createLists,
        _createList: createList,
        _createAnchor: createAnchor,
        _createText: createText,
        _createHorizontal: createHorizontal,
        _createIcon: createIcon,
        _createSubMenu: createSubMenu
    };

    const defaultConfig = {
        totalAngle: 360,//deg,
        spaceDeg: 0,//deg
        background: "#323232",
        backgroundHover: "#515151",
        pageBackground: "transparent",
        percent: 0.32,//%
        diameter: 300,//px
        position: 'top',
        horizontal: true,
        animation: "into",
        hideAfterClick: true
    };


    function config (config) {

        config = extend$1(defaultConfig, config);

        this._creator = new Creator(this, config);
        this._creator.createMenu();

        return this;
    }

    function setCoordinate(coordinate){
        if( !(coordinate instanceof Array) || !(coordinate.length === 2) ) return;

        //TODO verify if has unit
        style(this._container, 'left', coordinate[0] + "px");
        style(this._container, 'top', coordinate[1] + "px");
    }

    //check disabled

    function setDisabled(){
        this._creator._anchors.forEach(function(v){
            v.setDisabled();
        });
    }

    function show (coordinate) {


        setDisabled.call(this);

        setCoordinate.call(this, coordinate);

        classed(this._container, 'opened-nav', true);
        return this;
    }

    function hide () {
        classed(this._container, 'opened-nav', false);
        return this;
    }

    function styles (styles) {
        if(!styles instanceof Object) return this;
        
        for(var k in styles){
            if(styles.hasOwnProperty(k)) style(this._container, k, styles[k]);
        }

        return this;
    }

    function CMenu(element, pMenu){
        this._container = element;
        
        if(pMenu) this._pMenu = pMenu;
    }

    CMenu.prototype = {
        constructor: CMenu,
        config: config,
        show: show,
        hide: hide,
        styles: styles

    };

    function index (selector) {
        return typeof selector === "string"
            ? new CMenu(document.querySelector(selector))
            : new CMenu(selector);
    }

    return index;

}));

//circular-menu

    var cmenu = CMenu("#circle-menu1")
	    var cmenu = CMenu(ele)
            .config({
                        totalAngle: 40,//deg,
                        spaceDeg: 0,//deg
                        background: "#52BCEC",
                        backgroundHover: "#d3d3d3",
                        percent: 0.20,//%
                        diameter: 270,//px
                        position: 'top1',
                        horizontal: true,
						hideAfterClick: false,
                        animation: "into",
                        menus: [
							{
                                title: 'Global Finance',
                                icon: '',
                                href: '#5',
                                menus: [
                                    {
                                        title: 'DELTA - CLAN',
                                        icon: '',
										menus: [
											{
												title: 'ANS CLAN',
												icon: '',
											}
										]
                                    }
                                ]
                            },
                        ]
                    }).show();

无效值,尽管指定了数字,但磁盘大约为500MB。

按照&#34; AVD详细信息&#34;中的路径转到AVR的文件夹。

在config.ini中将其编辑为

disk.dataPartition.size=4000M

并删除所有.img文件。

答案 4 :(得分:10)

我正在安装apk:

adb install /home/me/jones_android-arm.apk

我收到一条错误消息告诉我

/data/local/tmp/jones_android-arm.apk

太大了。使用r15和ADT 15中的sdk工具,我能够使用AVD管理器 操纵我现有的一些模拟器设置:

Window-> AVD Manager -> (select you virtual machine) -> Edit

然后转到“皮肤:”下方的硬件属性窗口,我可以选择  使用硬件:新按钮'理想的分区大小'。但是,我不能  将值设置为“0”以外的值。无所畏惧,我去了我的$ {HOME} /.android / avd目录  有一个'MyVm.avd'目录。进入该目录我找到了'config.ini'  文件。有条目:

disk.dataPartition.size=0

我将其设置为:

disk.dataPartition.size=1024

..然后回到AVD Manager,选择MyVm,选择'Start',选择 擦除用户数据赢得下面的对话框,并且能够运行并安装。

答案 5 :(得分:6)

avd manager有一个“理想的系统分区大小”选项,尝试将其设置为1024MB,或者使用同样的命令行启动选项。

fyi,我只用4.0模拟器图像遇到了这个问题。

答案 6 :(得分:5)

这个问题来自android 1.5 ..尝试2.0或2.1或2.2

答案 7 :(得分:5)

只需按命令行启动模拟器,如下所示:

emulator -avd <your avd name> -partition-size 1024 -wipe-data

答案 8 :(得分:3)

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.junkfoodian"
android:installLocation="preferExternal"   // this line can work for  Installation error:            //                                             // INSTALL_FAILED_INSUFFICIENT_STORAGE

答案 9 :(得分:2)

我是初学者,但在玩“Hello Grid View”时遇到了这个问题。我试图使用我自己的照片,这些照片的文件大小都非常大。

快速解决方法是减少照片数量,从而减少APK文件的大小。

但是,我想我的后续问题是任何打到这个帖子的人都是这样的:我如何将大型文件如JPG和MP3附加到应用程序并确保它们保存在SD卡上以便APK保持小?< / p>

答案 10 :(得分:2)

要在Linux中调整Android模拟器的存储大小:

1)安装qemu

2)找到包含虚拟机img文件的目录。像〜/ .android / avd / .avd和CD之类的东西。

3)调整ext4图像的大小:即从500Mb增长到4Gb执行

qemu-img resize userdata.img +3.5GB
qemu-img resize userdata-qemu.img +3.5GB

4)扩展文件系统:

e2fsck -f userdata.img
resize2fs userdata.img
e2fsck -f userdata-qemu.img
resize2fs userdata-qemu.img

5)对于SD卡图片,可选:救援数据:

mkdir 1
mount -o loop sdcard.img 1
cp -a 1 2
umount 1

6)将图像从100Mb调整为Gb:

qemu-img resize sdcard.img +3.9GB

7)重新生成文件系统:

mkfs.vfat sdcard.img

8)可选:恢复旧数据:

mount -o loop sdcard.img 1
cp -a 2/* 1
mount -o loop sdcard.img 1 

答案 11 :(得分:2)

在AVD Manager中更新您的设置,并启用&#39;擦除用户数据&#39;来启动设备。这对我有用。

答案 12 :(得分:2)

您需要增加模拟器的虚拟内存

如何增加模拟器的虚拟内存

emulator -avd“Emulator Name”-partition-size 2024

然后尝试安装你的apk

答案 13 :(得分:1)

我猜您应该使用“emulator -wipe-data -avd YourAvdName”重新启动模拟器,或者如果您使用的是Eclipse,请在运行配置中选中“擦除用户数据”。

我现在面临同样的问题。

答案 14 :(得分:0)

尝试选择项目 - &gt;清洁。一个简单的清洁可能会解决它。

答案 15 :(得分:0)

以下方法对我有用

  1. 在终端窗口中导航到您的android SDK / tools文件夹(如果您没有为其添加路径)

  2. 确保您计划清理的虚拟设备已关闭。

  3. 运行命令“./emulator -wipe-data -avd YourAvdName”,其中YourAvdName是您的虚拟Android设备的名称

答案 16 :(得分:0)

您可以在eclipse平台的AVD管理器对话框中从左侧树“虚拟设备”中选择一个项目时启动该项目,启动UI具有“擦除用户数据”选项

答案 17 :(得分:0)

这绝对不是一个合适的答案,但这是一个小小的暗示。

如果您想在App中使用静态文件。您应该将它们作为资源或资产。 但是,如果你有关于保持你的APK小的内存问题,那么你需要以这样的方式改变你的应用程序设计,

而不是将它们作为资源放置,而在运行您的应用程序(安装后)时,您可以从SD卡中获取文件(因为用户可能无法保存文件,因此可以保留不同的文件)。为此,U可以使用ContentResolver在用户选择时获取音频,图像文件。

通过这种方式,您可以为用户提供另一项功能,例如他可以根据自己的选择将音频/图像文件加载到应用程序。

答案 18 :(得分:0)

我唯一一次看到这种情况发生在主机文件系统基本上没有空间的时候。在存储VM文件系统的文件系统上有足够的可用空间吗?

答案 19 :(得分:0)

我正在使用 VSCode,我的 AVD 设置来自我有一段时间没有使用过的旧版 Android Studio 设置。

通过找到 AVD 图像所在的位置,然后搜索包含文本的文件,我能够解决此问题

disk.dataPartition.size

找到 AVD 的目录后,运行 find . -name "avd*"grep "disk" *

修改 disk.dataPartition.size 文件中的 hardware-qemu.ini 值对我有用。