【发布时间】:2019-02-03 22:01:32
【问题描述】:
我目前正在开发一个 Android 应用程序,我在 VS 上搞砸了一点。
我想知道,这两种模式之间的真正区别是什么?我做了一些研究,但并没有完全了解每种模式的真正差异和优势,以及何时使用特定模式。
在我的研究过程中,我遇到了1、2和3这三个问题,谈到了两者之间的区别。
- 为什么调试模式比发布模式运行慢?
- 向 Google Play 发布应用程序时,我应该使用哪种模式以及为什么?
- 我可以创建自己的模式吗?
我的应用似乎在调试模式下构建良好,但在发布模式下,我收到很多关于“未找到调试符号文件”的警告。
- 那些调试符号是什么?
- obj/Debug 或 obj/Release 中的“81”文件夹是什么?
- 我还注意到,有时从 Debug 切换到 Release 时,找不到某些 Resource.Id,我需要为布局重新创建 axml 文件并清理 sln。我该如何预防?
据我了解,调试模式使用了一些发布模式不需要运行的文件,我假设丢失的文件是那些“调试符号”?也许这是 Xamarin 或 VS 的问题? 这些是我收到的警告:
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.v7.AppCompat.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Java.Interop.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Arch.Core.Common.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Arch.Lifecycle.Common.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Arch.Lifecycle.Runtime.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Animated.Vector.Drawable.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Annotations.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Compat.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Core.UI.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Core.Utils.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Design.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Fragment.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Media.Compat.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Transition.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.v4.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.v7.RecyclerView.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.Android.Support.Vector.Drawable.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.GooglePlayServices.Base.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.GooglePlayServices.Basement.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.GooglePlayServices.Maps.dll but no debug symbols file was found. 0
Warning Directory obj\Release\81\android/assets contains Xamarin.GooglePlayServices.Tasks.dll but no debug symbols file was found. 0
- 在发布应用程序时,这些警告真的是我需要担心的吗?它们会导致更多错误吗?
我已经试过了:
删除这些文件。
清理解决方案和整个项目。
【问题讨论】:
-
@SushiHangover 你能提供更多细节吗?什么是调试符号以及为什么 VS 将其标记为警告?
标签: java c# android visual-studio xamarin