Cordova android emulation – Error: Cannot read property ‘semver’ of null

This is due using an emulator with an unstable Developer Preview API version. You probably have a device using API 27 (Android 8.1). Open your AVD, remove that device and re-run. It’s also useful to use –target <emulator_name> when launching the emulator if you have more than one. To get a list of available names … Read more

PhoneGap – android exit on backbutton

You need to wait for the device to be ready to add the event listener: document.addEventListener(“deviceready”, onDeviceReady, false); function onDeviceReady(){ document.addEventListener(“backbutton”, function(e){ if($.mobile.activePage.is(‘#homepage’)){ e.preventDefault(); navigator.app.exitApp(); } else { navigator.app.backHistory(); } }, false); }

CORS and phonegap apps

PhoneGap you can just XHR directly to remote servers and it should “just work”. Cross-domain policy does not apply to PhoneGap (for a variety of reasons, basically because your app is essentially running off the file:// URI on-device). Please be aware that you will have to set up a whitelist for your apps to access … Read more

How can I specify the minimum SDK in phonegap? It is ignoring android-minsdkversion in config.xml

With older version of cordova CLI, I used to modify manually AndroidManifest.xml to change a few settings (launch mode, minsdk…) like you do in your answer. And with Cordova 3.5.something things started to go wrong, and some changes were lost each time I built the project. Now I added those lines in config.xml and the … Read more

Can I install a previous version of a plugin using the cordova plugin add command?

from official cordova website http://cordova.apache.org/news/2013/10/21/cordova-registry.html From anywhere within an app’s directory, plugins can be added to a project with cordova plugin add [PLUGIN_ID] where PLUGIN_ID is the id (typically reverse-domain style) shown on the plugin registry website. You can also download a specific version of a plugin: cordova plugin add [PLUGIN_ID]@[VERSION]

How to use Google Analytics with Phonegap without a plugin?

Check out the video to see it in action: http://screencast.com/t/6vkWlZOp After some research, I found a solution. I came across this thread on the Phonegap Google Group: https://groups.google.com/forum/#!msg/phonegap/uqYjTmd4w_E/YD1QPmLSxf4J (thanks TimW and Dan Levine!) In this thread I found that it is possible to use Google Analytics without a plugin. All you have to do is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)