Here these are the steps to create android app from gwt app
- Compile the GWT project. Right click on the project, select Google-> GWT compile and select the project. It will take some time till it gets compiled. The new stuff is created in war directory in that GWT project
- Than create new Android Project let’s say GwtTest.
- Create libs folder if not generate automatic and paste the phonegap.jar (0.9.4 or above), I used phonegap-1.2.0.jar
- Add the jar file on project’s Build path
- Copy all generated stuff from GWTProject/war directory to GwtTest/assets directory (gtwproject, WEB-INF, css and html file)
- Now in android project’s MainActivity, extends DroidGap instead of Activity. Remove setContentView line and add this line: super.loadUrl(“file:///android_asset/index.html”);
- In Manifest.xml file add line of internet permission:
uses-permission android:name=”android.permission.INTERNET”
- Create xml folder in res directory, put cordova.xml and config.xml file into the xml folder. Now you can run GwtTest as Android Application.
Remember the apk that will be generated while run as android, the size of apk is around 35mb. So make sure that your android device has this enough size.