Cordova android emulator stopped working

前端 未结 7 539
隐瞒了意图╮
隐瞒了意图╮ 2021-01-31 05:14

I\'m building an app for Android using Cordova. The android emulator was working fine but I wasn\'t using it because I installed the Ripple emulator. I continued on building my

7条回答
  •  一向
    一向 (楼主)
    2021-01-31 05:40

    I was playing with the Cordova workshop tutorial and ran into a similar issue with the android emulator not starting. I checked the above answer but it still didn't work for me. So here is what I did (I'm using windows 7):

    1. I started the AVD (Android Virtual device) manager from:

      start->programs->Android SDK Tools->AVD Manager.

    2. I noticed the single entry listed for Nexus_5_API_21_X86 had "?" next to Platform and other columns. This made me wonder why.

    3. I click "Edit" and specify the target platform, and other missing fields.

    4. Click the "Start" to start the AVD. After a min, you should also see the android emulator screen display.

    5. rerun cordova (c:\Cordova\workshop>cordova emulate android)

    6. Voila! The command window then displays the compilation progress and finally, you should see the messages below. After another min, you should be able to find your app on the android emulator.

      BUILD SUCCESSFUL
      
      Total time: 1 mins 10.307 secs
      Built the following apk(s):
          C:\Cordova\workshop\platforms\android\build\outputs\apk\android-debug.apk
      Installing app on emulator...
      Using apk: C:\Cordova\workshop\platforms\android\build\outputs\apk\android-debug.apk
      Launching application...
      LAUNCH SUCCESS
      

    Hope this helps!

提交回复
热议问题