0

monodevelop(バージョン 3.05) で Hello World アプリを作成し、エミュレーターで実行しようとしています。プログラムは正常にコンパイルされましたが、実行しようとすると次のエラーが発生します。

   Detecting installed packages


   Installing shared runtime


   Deployment failed. Internal error

すべての前提条件をインストールしました。

    1. mono for Android
     2. mono framework
      3. gtk#
       4. Android SDK

SDK Manager からすべてのパッケージをインストールします

以下はコードです。

 using System;

  using Android.App;
  using Android.Content;
  using Android.Runtime;
  using Android.Views;
  using Android.Widget;
  using Android.OS;

   namespace  myAndroid
    {
[Activity (Label = "myAndroid", MainLauncher = true)]
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++);
        };
    }
    }
         }

編集: .Net 2.0 .Net 4.0 Visual Studio 2010 Express は既にコンピューターにインストールされています。Windows 7 で Visual Studio 2005 を管理者として実行していますが、権限に関連する問題である場合、monodevelop は管理者として実行するオプションを提供しません。

4

1 に答える 1

1

これは VS2010 と VS2012 でも見られますが、主な理由は、プロジェクトがソリューション プロパティで展開するように設定されていない場合です。

ソリューションのプロパティ ウィンドウ

その展開フラグが削除されると、その問題が発生します。

于 2012-12-04T17:24:18.460 に答える