Pergunta

I setup a project using mgwt(1.2.0 SNAPDHOT) and gwt-phonegap (2.0.0). The phonegap always timed out with the following error with white screen on emulator

ERROR: file:///android_asset/www/index.html: Line 116 : Uncaught TypeError: Cannot read property 'uuid' of undefined

I included the phonegap.js (also added codova js for trial) as below in my index.html, but still getting the same error

<script type="text/javascript" charset="utf-8" src="cordova.js">
<script type="text/javascript" charset="utf-8" src="cordova_plugins.js">
<script type="text/javascript" charset="utf-8" src="phonegap.js">
<script type="text/javascript" language="javascript" rc="project_ph/project_ph.nocache.js">

    phoneGap.addHandler(new PhoneGapAvailableHandler() {
        @Override   
        public void onPhoneGapAvailable(PhoneGapAvailableEvent event) {
           //TODO
        }
    });

    phoneGap.addHandler(new PhoneGapTimeoutHandler() {
        @Override       
        public void onPhoneGapTimeout(PhoneGapTimeoutEvent event) {
            Window.alert("Phonegap time out");
        }
    });

    phoneGap.initializePhoneGap();

Please help.

Foi útil?

Solução

Cool :) Got the solution.. We need to add device plugin just as mentioned below. http://docs.phonegap.com/en/3.3.0/cordova_device_device.md.html

For example:

Android

(in app/res/xml/config.xml)
<feature name="Device">
    <param name="android-package" value="org.apache.cordova.device.Device" />
</feature>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top