Beginning with Apache Cordova

前端 未结 3 1511
南旧
南旧 2021-02-09 10:55

I have just donwloaded Apache Cordova and it seems like there are platform specific versions. Do I have to code for a specific platform before porting it to another? Is it possi

3条回答
  •  死守一世寂寞
    2021-02-09 11:21

    As long as you don't need the API, you can code everything in your browser. However, when you want to test the Cordova API features, you must run on a platform.

    The platform specific files (e.g. the eclipse project for android) contain a www folder (assets/www for android) where you have to put all of your code. Within that folder, everything should be cross-platform, with one exception: the cordova.js file that contains the bridge to the native code for each platform.

    You can also try Ripple to run a project directly on your browser, which has the advantage of better debugging tools. It is far from being feature comple though.

提交回复
热议问题