Skip to Content

How to mobilize SAPUI5 cordova wrapped app with android studio?

Dec 05, 2017 at 03:07 PM


avatar image

Dear all

I am trying to make an android from my SAPUI5 application using cordova.

I have followed this blog post for reference

However after I add the contents of my SAPUI5 Webapp folder into the "android-assets-www" folder and recompile the project, the apk that gets created is showing error "Unfortunately, app has stopped" on my device.

The following are the softwares and their corresponding versions installed.

  • npm - 5.4.2
  • cordova - 7.0.1
  • java - 1.8.0-144 (jdk and jre)
  • Android Studio - 2.3.3

I have questions regarding running the application

1) I use the cordova command in the below order

- cordova create FirstApp FirstApp

- cordova platform add android

- cordova prepare

- cordova compile

2) I am not using any cordova plugins

3) I make a reference of cordova.js in the index.html file after copying the contents of webapp folder into the www folder

4) I have also tried after adding SAPUI5 resources folder in android-assets-www folder, but no use.

5) I run the following commands again at the end to recompile.

- cordova prepare

- cordova compile

I am using Eclipse ADT for building path and adding Cordova library jar, even though it is written everywhere that android doesn't work with Eclipse anymore.

I want to build an apk for my app using Android Studio and run it on Studio itself or on my device.

However, if it is possible to run the apk generated using Eclipse ADT without getting "App stopped working" error, kindly suggest me how it is done.

Please help.


Kalpesh B.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Arthur Silva Jul 07 at 02:29 PM

Hello, maybe you should consider the use of SAP HAT on your project HAT has the capability to create the .apk by informing the project name.

10 |10000 characters needed characters left characters exceeded
Rehan Sayed Jul 12 at 07:10 AM

Hi Kalpesh,

If a real device is connected to your pc and it is recognized as well, then you can just use below command in Cmd
cordova run android
and the app will start on your device and check the logs to find the errors.


Rehan Sayed

10 |10000 characters needed characters left characters exceeded