0

my configurations are:

Ubuntu server 14.04 64 bit
GWT 2.7
Cordova 5.4.1
Andorid SDK Manage 24.04.1
Andorid SDK Tools 24.04.1
Andorid SDK Platform-Tools 23.1
Andorid SDK Build-Tools 23.0.2
Andorid 5.1.1(API 22) SDK Platform

and I downloaded the gwtphoneget showcase from here

https://github.com/vipulz/gwt-phonegap.showcase

and got it running in browser(by super dev model),then compile it,and followed this:

https://ccoenraets.github.io/cordova-tutorial

created a standard cordova project,and added andorid platform,copied showcase folder ,showcase.html and some resources files to a cordova project' www folder,renamed showcase.html to index.html,and added

<script type="text/javascript" src="cordova.js"></script>

before

<script type="text/javascript" src="showcase/showcase.nocache.js"></script>

then cd to platforms/andorid,run

cordova run android

then an app has been installed to my phone(running android 4.4.2)

It seems that all gwt/js stuff works,I can click menus to corresponded views,but all native call doesn't work,for example,cliking ACCELEROMETER,jump to corresponded view then clck [Start] button,it will give an Alert:

uncaught:Exception caught:(TypeError):Cannot call method 'watchAcceleration' of undefined

and actually each native call will give similar error,what did I wrong?

Alex Luya
  • 9,412
  • 15
  • 59
  • 91

1 Answers1

0

Finally,I found that after plugin get installed(like below),corresponded function worked


cordova plugin add cordova-plugin-camera

Alex Luya
  • 9,412
  • 15
  • 59
  • 91