2012-08-31 147 views
-1

大家好:)我決定嘗試使用NetBeans的Android SDK。我安裝了SDK和軟件包,爲NetBeans創建了安裝插件。我寫了一個小應用程序,然後啓動它。起初它沒有出現。我再次啓動,我的防病毒軟件要求提供網絡訪問,我很樂意接受。然後,設備顯示黑屏,並關閉了窗口,而我的NetBeans窗口根本沒有更新(如仿真器仍在運行)。下一次運行只是在任務管理器中彈出新的進程並立即離開。直接從SDK Manager運行仿真器只是返回了emulator-arm.exe沒有響應的窗口。我的詳細運行給了這個:Android模擬器在發佈時崩潰

emulator: found SDK root at D:\Programming\Android SDK 
emulator: Android virtual device file at: C:\Users\Teodor\.android/avd/AVD16.ini 
emulator: virtual device content at C:\Users\Teodor\.android\avd\AVD16.avd 
emulator: virtual device config file: C:\Users\Teodor\.android\avd\AVD16.avd/config.ini 
emulator: using core hw config path: C:\Users\Teodor\.android\avd\AVD16.avd/hardware-qemu.ini 
emulator: Found AVD target API level: 16 
emulator: found skin 'WVGA800' in directory: D:\Programming\Android SDK/platforms\android-16\skins 
emulator: autoconfig: -skin WVGA800 
emulator: autoconfig: -skindir D:\Programming\Android SDK/platforms\android-16\skins 
emulator: found skin-specific hardware.ini: D:\Programming\Android SDK/platforms\android-16\skins/WVGA800/hardware.ini 
emulator: keyset loaded from: C:\Users\Teodor\.android\default.keyset 
emulator: trying to load skin file 'D:\Programming\Android SDK/platforms\android-16\skins/WVGA800/layout' 
emulator: skin network speed: 'full' 
emulator: skin network delay: 'none' 
emulator: autoconfig: -kernel D:\Programming\Android SDK/system-images\android-16\armeabi-v7a\/kernel-qemu 
emulator: autoconfig: -ramdisk D:\Programming\Android SDK/system-images\android-16\armeabi-v7a\/ramdisk.img 
emulator: Using initial system image: D:\Programming\Android SDK/system-images\android-16\armeabi-v7a\/system.img 
emulator: autoconfig: -data C:\Users\Teodor\.android\avd\AVD16.avd/userdata-qemu.img 
emulator: autoconfig: -initdata C:\Users\Teodor\.android\avd\AVD16.avd/userdata.img 
emulator: autoconfig: -cache C:\Users\Teodor\.android\avd\AVD16.avd/cache.img 
emulator: autoconfig: -sdcard C:\Users\Teodor\.android\avd\AVD16.avd/sdcard.img 
emulator: Physical RAM size: 512MB 

Content of hardware configuration file: 
    hw.cpu.arch = arm 
    hw.cpu.model = cortex-a8 
    hw.ramSize = 512 
    hw.screen = touch 
    hw.mainKeys = yes 
    hw.trackBall = yes 
    hw.keyboard = no 
    hw.keyboard.lid = no 
    hw.keyboard.charmap = qwerty2 
    hw.dPad = yes 
    hw.gsmModem = yes 
    hw.gps = yes 
    hw.battery = yes 
    hw.accelerometer = yes 
    hw.audioInput = yes 
    hw.audioOutput = yes 
    hw.sdCard = yes 
    hw.sdCard.path = C:\Users\Teodor\.android\avd\AVD16.avd/sdcard.img 
    disk.cachePartition = yes 
    disk.cachePartition.path = C:\Users\Teodor\.android\avd\AVD16.avd/cache.img 
    disk.cachePartition.size = 66m 
    hw.lcd.width = 480 
    hw.lcd.height = 800 
    hw.lcd.depth = 16 
    hw.lcd.density = 240 
    hw.lcd.backlight = yes 
    hw.gpu.enabled = no 
    hw.camera.back = emulated 
    hw.camera.front = none 
    vm.heapSize = 48 
    hw.sensors.proximity = yes 
    hw.sensors.magnetic_field = yes 
    hw.sensors.orientation = yes 
    hw.sensors.temperature = yes 
    kernel.path = D:\Programming\Android SDK/system-images\android-16\armeabi-v7a\/kernel-qemu 
    kernel.parameters = android.checkjni=1 
    disk.ramdisk.path = D:\Programming\Android SDK/system-images\android-16\armeabi-v7a\/ramdisk.img 
    disk.systemPartition.initPath = D:\Programming\Android SDK/system-images\android-16\armeabi-v7a\/system.img 
    disk.systemPartition.size = 200m 
    disk.dataPartition.path = C:\Users\Teodor\.android\avd\AVD16.avd/userdata-qemu.img 
    disk.dataPartition.size = 200m 
    avd.name = AVD16 
. 
QEMU options list: 
emulator: argv[00] = "./emulator-arm.exe" 
emulator: argv[01] = "-android-hw" 
emulator: argv[02] = "C:\Users\Teodor\.android\avd\AVD16.avd/hardware-qemu.ini" 
Concatenated QEMU options: 
./emulator-arm.exe -android-hw C:\Users\Teodor\.android\avd\AVD16.avd/hardware-qemu.ini 
emulator: registered 'boot-properties' qemud service 
emulator: nand_add_dev: system,size=0xc800000,initfile=D:\Programming\Android SDK/system-images\android-16\armeabi-v7a\/system.img 
emulator: mapping 'system' NAND image to C:\Users\Teodor\AppData\Local\Temp\\AndroidEmulator\TMPD8B6.tmp 
emulator: rounding devsize up to a full eraseunit, now c810000 
emulator: nand_add_dev: userdata,size=0xc800000,file=C:\Users\Teodor\.android\avd\AVD16.avd/userdata-qemu.img 
emulator: rounding devsize up to a full eraseunit, now c810000 
emulator: registered 'boot-properties' qemud service 
emulator: Adding boot property: 'dalvik.vm.heapsize' = '48m' 
emulator: Adding boot property: 'qemu.sf.lcd_density' = '240' 
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1' 
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back' 
emulator: nand_add_dev: cache,size=0x4200000,file=C:\Users\Teodor\.android\avd\AVD16.avd/cache.img 
emulator: Initializing hardware OpenGLES emulation support 
emulator: Kernel parameters: qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=1 
Failed to allocate memory: 1455 

This application has requested the Runtime to terminate it in an unusual way. 
Please contact the application's support team for more information. 

我在指責,我沒有等到我的冷杉運行顯示ANDROID字母的事實。所以現在我不知道該怎麼做......重新安裝所有東西(我的互聯網連接需要很長時間才能完成)還是有更好的解決方案?

P.S.我試圖刪除並添加虛擬設備

編輯:殺死從SYSTEM運行的任務管理器中的adb.exe沒有幫助。

回答

5

我發現Eclipse比Net Beans更適合android應用程序開發。如果您可以重新考慮使用開發工具的選項,那麼我會說Eclipse是一個更好的選擇。

+0

如果我在同一臺電腦上同時安裝Eclipse和Net Beans,應該沒問題嗎?或者我應該刪除NB,因爲它不衝突? – Xeos

+0

不,我在我的電腦上安裝了Net Beans和Eclipse。我使用兩個Java程序,但我只使用Eclipse的android不能說爲什麼,但我覺得很方便。 – NewUser

+0

嗯,我猜是因爲它適用於Eclipse而不適用於NetBeans ..我現在就試試。 – Xeos

2

您需要了解Android開發的第一件事情就是閱讀實際閱讀日誌和搜索錯誤。有搜索

android emulator Failed to allocate memory: 1455 

時,反正你嘗試在不同的論壇提供的解決方案,你想測試你的東西在真實設備上早晚,保存自己很多的挫折與仿真,並得到一個便宜的Android手機。