Cordova android emulator stopped working

前端 未结 7 553
隐瞒了意图╮
隐瞒了意图╮ 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:32

    @Tech Pro

    Cordova 3.2 need Android KITKAT version sdk. So, the problem lies in your Android SDK version. There are two solutions of this problem.

    Solution:1:

    Update your Android SDK to latest version or downgrade to Cordova version 3.0 as suggested by @Evers

    Solution:2: If you don't want to either upgrade the Android SDK or downgrade Cordova version then follow the steps here.

    1. Find the CordovaWebView.java file ({project}\platforms\android\CordovaLib\src\org\apache\cordova)
    2. Go to Line No-296 and update the code as follows "android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KIT_KAT". Change your version code according to your SDK version from this link http://developer.android.com/reference/android/os/Build.VERSION_CODES.html. Ex: if you have Android 4.2 then chnage KITKAT into JELLY_BEAN.
    3. Comment out line No-299 i.e. //setWebContentsDebuggingEnabled(true);
    4. Now follow the steps given by @snake. i.e. ant clean and ant debug. I hope it will work

提交回复
热议问题