xamarin androidのアプリケーションをRedhat Mobile Appsに接続しようとしました。エラーメッセージ "未処理の例外メッセージが発生しました"が表示され続けます。ここでの主なactivtyRedHatMobileAppsのxamarinアプリでFHSDKエラーが発生しました
using System.Collections.Generic;
using Android.App;
using Android.Widget;
using Android.OS;
using Android.Util;
using FHSDK;
namespace helloworld_xamarin
{
[Activity(Label = "Quickstart HelloWorld", MainLauncher = true, Icon = "@drawable/icon")]
public class MainActivity : Activity
{
private const string Tag = "MainActivity";
protected override async void OnStart()
{
base.OnStart();
await FHClient.Init();
}
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
var button = FindViewById<Button>(Resource.Id.button);
var result = FindViewById<TextView>(Resource.Id.result);
var input = FindViewById<EditText>(Resource.Id.helloTo);
button.Click += async delegate
{
result.Text = "Calling Cloud.....";
var response = await FH.Cloud("hello", "GET", null, new Dictionary<string, string>() { { "hello", input.Text } });
if (response.Error == null)
{
Log.Debug(Tag, "cloudCall - success");
result.Text = (string)response.GetResponseAsDictionary()["msg"];
}
else
{
Log.Debug(Tag, "cloudCall - fail");
Log.Error(Tag, response.Error.Message, response.Error);
result.Text = response.Error.Message;
}
};
}
}
}
は、誰もがモバイルアプリのサービスをREDHATするxamarinモバイルアプリケーションをintergrateする経験を持っているのですか?私は既に私のアプリID、プロジェクトIDなどでfhconfigプロパティを埋めています。あなたの問題は何ですか?私は赤い帽子のモバイルアプリで新しいので、何もありません。
iはbase.on開始()にブレークポイントを追加し、アプリケーションはすぐに「ocured未処理の例外メッセージ」エラーメッセージが表示されます。多分fhsdkのエラーではなく、私のコードですか?あなたはredhatmobileアプリでの経験はありますか? –
- fhsdkを参照している各行をコメントアウトして、次に何が起こるかを確認することができますか? – GregHNZ
誰かがredhatモバイルアプリでの経験を持っている、私を助けてください –