0

この温度変換アプリケーションを作成しましたが、コードは完璧です。しかし、AVD を実行するたびに、次のエラーが表示されます。

[2012-06-05 12:22:58 - Emulator] Failed to allocate memory: 1455
[2012-06-05 12:22:58 - Emulator] 
[2012-06-05 12:22:58 - Emulator] This application has requested the Runtime to terminate it in an unusual way.
[2012-06-05 12:22:58 - Emulator] Please contact the application's support team for more information.
4

1 に答える 1

0

解決策 1:

私は、techarena フォーラムでの Calvin の指示に従って、最善かつ適切なソリューションを証明しました。

  • [スタート] ボタン、[ファイル名を指定して実行] の順にクリックし、[名前] ボックスに sysdm.cpl と入力して、Enter キーを押します。
  • [詳細設定] タブをクリックし、[パフォーマンス] の下の [設定] をクリックします。
  • [詳細設定] タブをクリックし、[仮想メモリ] で [変更] をクリックします。
  • [ドライブ [ボリューム ラベル]] で、変更するページング ファイルを含むドライブをクリックします。
  • [選択したドライブのページング ファイル サイズ] で [カスタム サイズ] をクリックし、[初期サイズ (MB)] ボックスまたは [最大サイズ (MB)] ボックスに新しいページング ファイル サイズをメガバイト (MB) 単位で入力して、[設定] をクリックします。
  • [OK] をクリックしてダイアログ ボックスを閉じ、変更を適用します。

この通常のエラー「メモリの割り当てに失敗しました: 1455」は、仮想メモリの割り当てが原因で発生します。この方法でルート C ディスクの仮想メモリの割り当てを解決した後、Eclipse のコンソールで次の情報を読み取る必要があります。

[2011-11-27 12:33:06 - Videotutorial1] ------------------------------
[2011-11-27 12:33:06 - Videotutorial1] Android Launch!
[2011-11-27 12:33:06 - Videotutorial1] adb is running normally.
[2011-11-27 12:33:06 - Videotutorial1] Performing com.videotutoriales.videotutorial1.Videotutorial1Activity activity launch
[2011-11-27 12:33:06 - Videotutorial1] Automatic Target Mode: Preferred AVD 'VtAVD' is not available. Launching new emulator.
[2011-11-27 12:33:06 - Videotutorial1] Launching a new emulator with Virtual Device 'VtAVD'
[2011-11-27 12:33:39 - Emulator] emulator: emulator window was out of view and was recentered
[2011-11-27 12:33:39 - Emulator]
[2011-11-27 12:33:45 - Videotutorial1] New emulator found: emulator-5554
[2011-11-27 12:33:45 - Videotutorial1] Waiting for HOME ('android.process.acore') to be launched...
[2011-11-27 12:38:19 - Videotutorial1] HOME is up on device 'emulator-5554'
[2011-11-27 12:38:19 - Videotutorial1] Uploading Videotutorial1.apk onto device 'emulator-5554'
[2011-11-27 12:38:20 - Videotutorial1] Installing Videotutorial1.apk...
[2011-11-27 12:40:52 - Videotutorial1] Success!
[2011-11-27 12:40:53 - Videotutorial1] Starting activity com.videotutoriales.videotutorial1.Videotutorial1Activity on device emulator-5554
[2011-11-27 12:41:18 - Videotutorial1] Attempting to connect debugger to 'com.videotutoriales.videotutorial1' on port 8628

解決策 2:

Android Virtual Device Manager を開き、デバイスの RAM サイズの値を 15 以下またはそれ以上の値に追加または変更します。

ここに画像の説明を入力

于 2012-06-05T09:12:28.317 に答える