我一直在接受
设备上没有剩余空间
尝试从我的Xamarin.Forms解决方案运行Android项目时出现错误消息。以下是错误消息。这适用于物理设备,但不适用于Emulator。有什么我可以尝试的吗?
Detecting installed packages
Target device is x86.
Installing the Mono shared runtime (debug - 1503094152)...
10% ... 3520kb of 35036kb copied
20% ... 7040kb of 35036kb copied
Installing shared runtime
30% ... 10560kb of 35036kb copied
40% ... 14016kb of 35036kb copied
50% ... 17536kb of 35036kb copied
60% ... 21056kb of 35036kb copied
70% ... 24576kb of 35036kb copied
80% ... 28032kb of 35036kb copied
90% ... 31552kb of 35036kb copied
Deployment failed
Mono.AndroidTools.AdbException: No space left on device
at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError (System.Threading.CancellationToken token) [0x0002a] in /Users/builder/data/lanes/4986/28510831/source/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Util/AggregateAsyncResult.cs:72
at Mono.AndroidTools.Adb.AdbSyncClient.EndPush (System.IAsyncResult result) [0x00006] in /Users/builder/data/lanes/4986/28510831/source/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Adb/AdbSyncClient.cs:771
at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (System.IAsyncResult iar, System.Func`2[T,TResult] endFunction, System.Action`1[T] endAction, System.Threading.Tasks.Task`1[TResult] promise, System.Boolean requiresSynchronization) [0x0000f] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(516,2): error : No space left on device
Touching "obj/Debug/upload.flag".
Done building target "_Upload" in project "Articles.Droid.csproj".
Done building project "Articles.Droid.csproj".
Build succeeded.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(516,2): error : No space left on device
0 Warning(s)
1 Error(s)
转到您的终端并输入:
$ [[path-to-android-sdk]]/tools/android list avd
这将显示一个包含您已配置的所有AVD(Android虚拟设备)的窗口。找到你正在使用的那个并写下它的名字。
接下来,返回终端并输入:
$ open -a TextEdit ~/.android/avd/[[name of your avd]].avd/config.ini
这将打开带有AVD配置文件的TextEdit。现在查找并更改或添加此行:
data.dataPartition.size=2048m
接下来,返回终端并输入:
$ open -a TextEdit ~/.android/avd/[[name of your avd]].avd/hardware-qemu.ini
这将使用硬件配置文件再次打开TextEdit。现在查找并更改或添加此行:
data.dataPartition.size=2048m
然后在设备管理器中单击“恢复出厂设置”。然后启动模拟器,它找到了正确的存储大小。
就是这样。你定了!