私はアンドロイドをアンインストールして、スペースを使わずにc:\ androidSdktoolsに再インストールしました。 これでエミュレータが動作するようになりましたが、私はエミュレータを見ることができます。私はmonoのAndroidをシンプルな "hello world"にしようとしていますが、エミュレータでは "hello world"が表示されません。なぜですか?
しかし、 "hello world"というテキストのコードを試してみましたが、アプリケーションを実行してエミュレータを実行しているときにアンドロイドエミュレータが表示されますが、 "hello world"は見えません。 エミュレータを終了してエラーを取得するとエラーが発生するため、何か良いことをしていないのか、それとも多分それがエラーなのかどうかは分かりません。私が "はい"と言うなら、彼は私が実行/デバッグする前に私のソリューションを再構築/ビルドするように頼んでいますが、このエラーは解決しませんでした。
このエラーが、私がアンドロイドエミュレータに「hello world」のテキストが表示されないという事実と関係があるかどうかはわかりません。
私は今、このコードを作ってみました:
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace MonoAndroidApplication1
{
[Activity(Label = "MonoAndroidApplication1", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
int count = 1;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.MyButton);
button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
}
}
}
私は、Visual StudioのC#の2010年のプロを持っています。
私はこれを試しましたが、私は新しいアンドロイドモノアプリケーションを作成するときに作成した自動コードです。
しかし、エミュレータのテキストは何も表示されませんでした。
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace MonoAndroidApplication1
{
[Activity(Label = "MonoAndroidApplication1", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
{
int count = 1;
TextView tv;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
tv = new TextView(this);
tv.Text = "hello world";
SetContentView(tv);
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.MyButton);
button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
}
}
}
そして再び、私はエミュレータを終了するときにそれを実行している任意のテキスト「Hello World」の そして、まだこの展開エラーが発生してエミュレータで確認し、デバッグを停止しませんでした何も:私は、このコードに追加してみました/アプリケーションを実行する。エミュレータは正常に動作していますが、終了時にこのエラーが発生します。
なぜ、私はエミュレータでテキスト "hello world"が表示されないのですか?
ありがとうございました。
「Cuzのは」言葉ではない、完全な単語「理由」を書き出すには時間がかかるしてください。 「cuz」の使用を正当化するのに十分な非公式な文脈は事実上存在しない。 – meagar