我正在开发一套移动应用程序 - 特别是Windows Store/Mobile 8和Android.
安装了VS2012然后安装了Monodroid后,我就可以在模拟器中启动x86 Android映像,并利用英特尔HAXM加速(模拟器输出确认HAXM正常工作)来实现VM黄油流畅.
然后我安装了Windows Phone 8 SDK - 它启用了Hyper V角色 - 现在模拟器说它无法找到HAXM.我然后卸载并尝试重新安装HAXM,但现在它不会 - 说我的处理器不支持它.
在BIOS中仍然启用VT-x扩展 - 所以我认为Hyper-V阻止了英特尔HAXM的工作.
当然它不是杀手 - 但是非加速的Android图像比启用HAXM的图像要慢得多 - 其他人遇到过这个问题吗?谷歌搜索没有提出任何明显的...
更新(2012年11月30日)
根据@ alexw的建议,我尝试停止并禁用Hyper-V; 重启.它仍然无法正常工作.
我意识到下一步可能是Windows Phone SDK(并删除Hyper-V),然后再试一次 - 确认它确实存在 Hyper-V.目前这不太方便 - 但我会尽快做到并更新.
我想在monodroid项目中存储开发与生产连接字符串和配置字符串.我通常将它作为应用程序设置存储在web.config或app.config中,但我应该如何在monodroid和monotouch项目中执行此操作?我也希望它能像调试工作室使用*.config文件一样在调试和发布版本之间自动切换配置.在iOS应用程序中,我可以将它们存储在plist中,但我想要一个单声道的跨平台解决方案.
我如何在monodroid或monotouch中做到这一点?
无论用户设置如何,如何强制Xamain - Android / iOS在美国英语文化中工作。我在应用程序中面临的问题是,该应用程序仅支持美国/英国英语,但如果用户将语言偏好更改为西班牙语、德语等。数字日期等格式将发生变化。
例如, 2.35将在西班牙语、德语中表示为2,35。
因此,如果用户尝试使用具有相似语言的应用程序,该应用程序将错过行为或崩溃。在我尝试Convert.ToDouble("2,35");或类似的情况下会发生崩溃。
所以我的怀疑是,
在 Xamarin 中是否可以将文化强制设置为 en-US。可能在一个地方,否则我需要在我执行转换的所有地方更改它。
请帮忙。
我对C#和Xamarin很陌生,并且一直试图实现底层元素并且不知道如何正确地执行它.我正在使用Cocosw.BottomSheet-Xamarin.Android库.
这是我的代码:
Cocosw.BottomSheetActions.BottomSheet.Builder b = new Cocosw.BottomSheetActions.BottomSheet.Builder (this);
b.Title ("New");
b.Sheet (Resource.Layout.menu_bottom_sheet)
Run Code Online (Sandbox Code Playgroud)
现在我认为我应该使用b.Listener(...),但它需要一个接口IDialogInterfaceOnClickListener作为参数,我不知道如何正确地在C#中做到这一点.
在Java中我可以写
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Perform action on click
}
});
Run Code Online (Sandbox Code Playgroud)
我试过这样做:
class BottomSheetActions : IDialogInterfaceOnClickListener {
public void OnClick (IDialogInterface dialog, int which) {
Console.WriteLine ("Hello fox");
}
public IntPtr Handle { get; }
public void Dispose() {
}
}
Run Code Online (Sandbox Code Playgroud)
然后这个:
b.Listener (new BottomSheetActions());
Run Code Online (Sandbox Code Playgroud)
但它没有用.
未部署Xamarin的第一个教程.因此模拟器显示空白屏幕.谁能帮我 .请在VS 15中找到构建详细信息.
1>Starting deploy AVD_GalaxyNexus_ToolsForApacheCordova ...
1>Deploying AVD_GalaxyNexus_ToolsForApacheCordova ...
1>Build started.
1>C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE;__XAMARIN_ANDROID_v1_0__;__MOBILE__;__ANDROID__;__ANDROID_1__;__ANDROID_2__;__ANDROID_3__;__ANDROID_4__;__ANDROID_5__;__ANDROID_6__;__ANDROID_7__;__ANDROID_8__;__ANDROID_9__;__ANDROID_10__;__ANDROID_11__;__ANDROID_12__;__ANDROID_13__;__ANDROID_14__;__ANDROID_15__;__ANDROID_16__;__ANDROID_17__;__ANDROID_18__;__ANDROID_19__;__ANDROID_20__;__ANDROID_21__;__ANDROID_22__;__ANDROID_23__ /errorendlocation /preferreduilang:en-US /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\Mono.Android.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\Phonefirst.dll /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /target:library /utf8output CodeFile1.cs MainActivity.cs PhonewordTranslator.cs Resources\Resource.Designer.cs Properties\AssemblyInfo.cs "C:\Users\Pabanas\AppData\Local\Temp\MonoAndroid,Version=v6.0.AssemblyAttributes.cs" obj\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\Debug\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\Debug\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
1>The field 'MainActivity.count' is assigned but its …Run Code Online (Sandbox Code Playgroud) 当我想用POST方法连接Paypal Rest API时,我遇到了问题.当我不使用modernhttpclient时,我收到了错误
The authentication or decryption has failed.
Run Code Online (Sandbox Code Playgroud)
但是,当我使用modernhttpclient时,它可以在Android API 23(Marshmallow)中工作,当我在Android API 19(设备)和Android API 16(模拟器)中测试时,我收到错误
ex {Javax.Net.Ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=…} Javax.Net.Ssl.SSLHandshakeException
Run Code Online (Sandbox Code Playgroud)
根据ssl握手异常android我需要使用自定义套接字工厂.但是如何在HttpClient或modernHttpClient中实现它呢?
我正在为Android和iOS开发便携式应用程序.我当前的功能是截取屏幕截图并在代码中使用该图像.因此我在便携式库中有一个接口.
public interface IFileSystemService
{
string GetAppDataFolder();
}
Run Code Online (Sandbox Code Playgroud)
我正在使用以下代码在可移植库中获取屏幕截图:
static public bool TakeScreenshot()
{
try
{
byte[] ScreenshotBytes = DependencyService.Get<Interface.IScreenshotManager>().TakeScreenshot();
return true;
}
catch (Exception ex)
{
}
return false;
}
Run Code Online (Sandbox Code Playgroud)
这可以调用Android或iOS版本.
安卓:
class ScreenshotManagerAndroid : IScreenshotManager
{
public static Activity Activity { get; set; }
public byte[] TakeScreenshot()
{
if (Activity == null)
{
throw new Exception("You have to set ScreenshotManager.Activity in your Android project");
}
var view = Activity.Window.DecorView;
view.DrawingCacheEnabled = true;
Bitmap bitmap = view.GetDrawingCache(true);
byte[] bitmapData; …Run Code Online (Sandbox Code Playgroud) 所以我在我的一个应用程序上启用了proguard.我有一些问题,但我解决了所有问题(必须更新proguard,制作没有空格的android sdk的符号链接)
现在我在另一个应用程序上启用了pro guard,我不断收到此错误:
The "Xamarin.Build.Download.XamarinBuildAndroidAarProguardConfigs" task could not be loaded from the assembly C:\Users\xxx\Desktop\xxx oud\packages\Xamarin.Build.Download.0.4.6\build\Xamarin.Build.Download.dll. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Run Code Online (Sandbox Code Playgroud)
有人知道解决这个问题的方法吗?不确定我还能添加什么
我是Xamarin开发人员,我研究过这个:https: //developers.google.com/android/reference/com/google/android/gms/location/SettingsApi
我想调用方法"startResolutionForResult",但要做到这一点,我需要知道REQUEST_CHECK_SETTINGS的值.在Xamarin GPS Api中,此方法的第二个参数只是一个整数.
这可能听起来像一个愚蠢的问题,但价值没有记录,并且android文档中只有一个页面引用它:https: //www.google.nl/webhp?sourceid = chrome-instant&ion = 1&espv = 2&ie= UTF-8#q =站点:developers.google.com + REQUEST_CHECK_SETTINGS&滤波器= 0
我已将一些Android支持库添加到我的项目中,现在我基本上面临与此问题中描述的相同的问题: Android Studio将支持库中的字符串导出到APK
由于我不能使用Xamarin的Gradle设置,我无法使用StackOverflow答案中描述的解决方案.
有没有人有一个想法,我如何才能在我的最终APK文件中保留特定的本地化?
xamarin.android ×10
xamarin ×7
android ×6
c# ×3
xamarin.ios ×2
apk ×1
app-config ×1
mono ×1
proguard ×1
ssl ×1