出现如下提示,错误: 找不到或无法加载主类 com.sun.tools.javac.MainMSB6006:
或
閿欒: 绋嬪簭鍖卆ndroid.support.v4.view.ViewPager涓嶅瓨鍦?
删掉bin,obj文件夹重新生成
还是没有效果的话参照这里http://blog.csdn.net/cctvcqupt/article/details/46636809
Your emulator is out of date, please update by launching Android Studio:
- Start Android Studio
- Select menu "Tools > Android > SDK Manager"
- Click "SDK Tools" tab
- Check "Android SDK Tools" checkbox
- Click "OK"
这个问题的解决方案其实不需要我汇总。。。错误信息很明白了
打开 Visual Studio,工具>Android>SDK 管理器,更新 Android SDK Tools
开启 ProGuard 后无法编译
https://forums.xamarin.com/discussion/54656/proguard-with-api-23-wont-compile-on-release-with-google-play-services-27-0-0-0
https://forums.xamarin.com/discussion/45210/enable-proguard-error-c-program-files-access-is-denied
https://www.shisujie.com/blog/Enable-ProGuard-Cause-Java-Exit
运行时错误不显示错误详情
监听
AndroidEnvironment.UnhandledExceptionRaiser
事件
System.IO.IsolatedStorage 无法使用
Xamarin Android nuget上的 System.IO.IsolatedStorage 是假的,请换用 System.IO 读写
System.IO 操作无效
确保路径分隔符正确
HttpWebRequest 的 AllowReadStreamBuffering 无法设置为 true
mono 目前没有实现这个属性,无解
iOS 无法生成
试试关闭优化 png 的选项
android 模拟器测试卡在部署阶段
生成,取消生成,然后再试一次
iOS 的优化 PNG 选项无法开启
删掉 iOS 项目中的无效 PNG 文件
Cannot build iOS App (Can not resolve reference: C:/Windows/Microsoft.NET/Framework/v4.0.30319/语言代码/mscorlib.resources.dll)
https://bugzilla.xamarin.com/show_bug.cgi?id=56213#c12
在位于100行的PropertyGroup元素中加入这一行<FrameworkPathOverride>$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)</FrameworkPathOverride>
DisplayAlert或UIAlertView在iOS无法正常工作
换用iPhone SE模拟器
启动模拟器后没有启动调试
不关闭模拟器重新调试
Effect的Control为null
Xamarin的Control里面是不含子元素的View,所以Control为null时试试Container
Android 7.0上不显示 SearchBar
设置HeightRequest为48
Unhandled Exception: System.TypeLoadException: Could not resolve type with token
重新生成项目
MSB3644 Xamarin.iOS,Version=v1.0 binding Microsoft.Common.CurrentVersion.targets
参考https://bugzilla.xamarin.com/show_bug.cgi?id=56213#c24
还有一些问题参见这里
https://releases.xamarin.com/common-issues-in-the-xamarin-15-2-2-release-being-tracked-by-the-xamarin-team/
如果这些还没有解决你的问题,试试
- 清理项目
- 重新生成项目
- 手动删掉bin和obj
- 重启visual studio
- 重启电脑
本文持续更新