本文介绍了无法存档 Xamarin.Forms 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我参与过的项目构建一个可供分发的 apk(遵循

值得注意的是,我还没有对项目属性进行任何更改,并且解决方案存储在相对较短的D:\Repository\QR Code Attendance 路径中.如果我猜想,这是 PATH 限制为 255 个字符的问题吗?如果是这样,我将如何克服它?

仅从 \Debug 文件夹复制 apk 并将其安装在 Android 手机上是行不通的.该应用程序一启动就会关闭.

解决方案

档案不在解决方案文件夹中.您的档案文件夹位于 C:/User/Administrator/App Data/Local/Xamarin/Mono for Android/Archives.您应该将其更改为较短的内容,例如 C:/Archives.这可以在 Tools -> 中完成.选项 ->Xamarin ->Android 设置 ->档案位置.

I'm trying to build a distribution-ready apk (following this guide) for a project I've been working on recently using Xamarin.Forms and Visual Studio 2019. However, i can't get past the Archiving Stage because i keep getting below error as stated by Visual Studio itself:

Cannot create the archive file because the copy of mdbs files failed.
Could not find a part of the path ...

Its worth noting that i have not changed anything yet on the project properties and the solution is stored on a relatively short path of D:\Repository\QR Code Attendance. If i am to guess, this is an issue with PATH limited to 255 characters? If so, how would i be able to overcome it?

Just copying the apk from the \Debug Folder and installing it on a Android Phone doesn't work. The app just closes as soon as it starts.

解决方案

The Archives are not in the solution folder. Your Archives folder is in C:/User/Administrator/App Data/Local/Xamarin/Mono for Android/Archives. You shoud change it to something shorter, like C:/Archives. This can be done in Tools -> Options -> Xamarin -> Android Settings -> Archives Location.

这篇关于无法存档 Xamarin.Forms 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 17:29