我正在尝试为 tizen TV 创建一个 C# Xamarin 项目 每当我包含 WebView 控件时,应用程序都会启动然后立即关闭。
我已经设置了互联网的权限(以及更多),但同样的事情总是发生。然而,当我尝试使用其他控件(标签、按钮)时,它工作得很好。 ``
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace CrossTemplate
{
public class App : Application
{
public App()
{
var html = new HtmlWebViewSource
{
Html = "your html here"
};
// The root page of your application
MainPage = new ContentPage
{
Content = new StackLayout
{
Orientation = StackOrientation.Horizontal,
Children = {
new WebView
{
WidthRequest = 100,
HeightRequest = 100,
/* Source = "http://google.com/" Url or pure html same thing happens*/
Source = html
}
}
}
};
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}
最佳答案
检查this page .
您无法在 Tizen TV 平台上使用 WebView 。
关于c# - Tizen xamarin webview 应用程序在启动时关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54588705/