我的应用程序来自客户端和服务器。客户端和服务器交换 json 数据。同一客户端和服务器上的时区(+4)。这个数据类
public class MyData()
{
public DateTime Start {get;set;}
}
Run Code Online (Sandbox Code Playgroud)
在服务器上,我从数据库 MS SQL 中选择数据并提供给客户端。当我对客户端数据字段反序列化时,Start 偏移了 -6 小时。我怎样才能得到正确的时间?我可以使用 JsonSerializerSettings 在客户端上获得正确的时间吗?我试过
var jsonSerializerSettings = new JsonSerializerSettings()
{
DateFormatHandling = DateFormatHandling.MicrosoftDateFormat,
DateParseHandling = DateParseHandling.DateTimeOffset,
DateTimeZoneHandling = DateTimeZoneHandling.Local
};
var result = JsonConvert.DeserializeObject<MyData>(content, jsonSerializerSettings);
Run Code Online (Sandbox Code Playgroud)
但它给出了+3的偏移量。我需要偏移+6。
我用Xamarin Forms创建了Android应用程序.对于发布,我使用选项"将程序集捆绑到本机代码中".我的apk有大小 - 17 Mb,没有这个选项33 Mb.我是否需要对我的库使用模糊处理或我的代码受到保护?我搜索了很多 - 但我找不到确切的答案.
我将Visual Studio 2015与Service Pack 1一起使用.在设备配置文件中仅提供API 19.
我看到一个警告:
无法建立连接到互联网.仅显示已获取平台的设备配置文件.
我该如何解决这个错误?
我使用Visual Studio 2015 SP2.我尝试使用sqlite创建Windows Universal应用程序.我为Unversal Windows平台和SQLite.Net-PCl添加了SQLite.这是我简单的代码
var conn = new SQLiteConnection(
new SQLitePlatformWinRT(),
Path.Combine(ApplicationData.Current.LocalFolder.Path, "Storage.sqlite"));
Run Code Online (Sandbox Code Playgroud)
它适用于桌面.但它不适用于移动设备(在设备和模拟器中).我得到这个异常System.DllNotFoundException:
HResult=-2146233052
Message=Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Source=SQLite.Net.Platform.WinRT
TypeName=""
StackTrace:
at SQLite.Net.Platform.WinRT.SQLite3.SetDirectory(UInt32 directoryType, String directoryPath)
at SQLite.Net.Platform.WinRT.SQLiteApiWinRT..ctor()
at SQLite.Net.Platform.WinRT.SQLitePlatformWinRT..ctor()
at AppDbTest.MainPage.DbConnection()
at AppDbTest.MainPage..ctor()
at AppDbTest.AppDbTest_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()
at AppDbTest.AppDbTest_XamlTypeInfo.XamlUserType.ActivateInstance()
Run Code Online (Sandbox Code Playgroud)
我尝试这种方法.我重新安装SQLite for Unversal Windows Platforms扩展和SQLite.Net-PCl.我创建了明确的项目.但它对我不起作用.
sqlite windows-phone sqlite-net win-universal-app visual-studio-2015
我为Windows 10桌面创建了uwp app(.Net native).我使用HockeyApp收集实时崩溃报告.堆栈跟踪不提供信息.这是一个长期存在的问题,并没有解决方案.我尝试了这个,但它不起作用.我得到以下例外:
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw
Arg_NullReferenceException
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected
The parameter is incorrect. The parameter is incorrect.
Run Code Online (Sandbox Code Playgroud)
在我的计算机上,应用程序运行稳定.也许这是由于Windows的版本.我认为这是由于我的xaml.对我来说纠正这些错误非常重要.但我不能拒绝这张桌子.任何想法如何找到这些错误的来源?
我有适用于Android的移动应用。我需要在我的应用程序中处理图像。这是示例图像:
这是带标记的桌子的照片。我需要找到这些标记及其位置。可以进行测试吗?ML Kit for Firebase是否可以使用?
如果是,我应该使用哪个API?如有任何建议,我将不胜感激。
我在 Flutter 应用程序中使用 DataTable。这是我的代码的简单示例:
DataTable(
columns: [
DataColumn(label: Text('Column1')),
DataColumn(label: Text('Column2')),
DataColumn(label: Text('Column3')),
],
rows: [
DataRow(cells: [
DataCell(Text('1')),
DataCell(Text('2')),
DataCell(Text('6')),
]),
DataRow(cells: [
DataCell(Text('12')),
DataCell(Text('John')),
DataCell(Text('9')),
]),
],
)
Run Code Online (Sandbox Code Playgroud)
我需要:
-column1 为可用宽度的 20%
-column1 为可用宽度的 40%
-column1 为可用宽度的 40%
我怎样才能做到这一点?数据表可以吗?
我用Xamarin Forms(Android)创建了应用程序.我打造了xamarin ui测试项目(Xamarin.UiTest = 1.3.7).我需要使用后门.这是我的代码:
public class MainActivity : FormsApplicationActivity
{
....
[Java.Interop.Export("Test")]
public void Test() { }
}
Run Code Online (Sandbox Code Playgroud)
它是单元测试中的调用方法
app.Invoke("Test");
Run Code Online (Sandbox Code Playgroud)
我得到这个例外:
20-04-2016 12:02:36.805 +03:00 - 72182 - Error while performing Invoke("Test", null)
Exception: System.Exception: Invoke for StartActivityTwo failed with outcome: ERROR
No such method found: Test()
in Xamarin.UITest.Android.AndroidGestures.Invoke(String methodName, Object[] arguments)
in Xamarin.UITest.Utils.ErrorReporting.With[T](Func`1 func, Object[] args, String memberName)
Run Code Online (Sandbox Code Playgroud)
对于Xamarin Android项目,它的代码是可行的.
如何使用xamarin ui测试的后门方法与xamarin表单项目?这是我在git上的测试项目.