Cordova Android project doesn't compile

后端 未结 3 1697
北海茫月
北海茫月 2020-12-15 10:26

Cordova version: 4.3.0

java version \"1.8.0_40\" 64bit

OS X 10.10.2

Ant version: 1.9.4

\

3条回答
  •  再見小時候
    2020-12-15 11:13

    Your Cordova is too high to work with Android Api 19. Meaning it's newer so it references libraries that Api 19 doesn't have and gives an error. So you need to dumb it down a little bit.

    Uninstall it:

    sudo npm uninstall -g cordova 
    

    And then install an older version of cordova that works well with Api 19:

    sudo npm install -g cordova@4.0.0
    

    and now do everything again from scratch. "cordova create blabla", "cordova platform add android", "cordova run android", etc.

    To get a list of cordova versions do:

    npm view cordova versions
    

    But I know that 4.0.0 will work with Api 19 since I had the same problem.

提交回复
热议问题