Please Help me run application with Arcgis API JS on Cordova Android

My application uses Arcgis JavaScript API, it works fine on the web version, but when I try to run it on Cordova I get this error

Has anyone encountered this situation?

Hi @yenph,

I was going to offer you a consultation of 60 Euro for 30 minutes, but because this forum is for OPEN SOURCE and friendly support, I will do it for free indeed.

I downloaded the library and followed the code and my assumption is that you are in the same context as in this other thread: Using Google maps js api with Cordova - #23 by perumalkuk

new Map() is from the ES6 standard and it looks like your Cordova still runs on ES5 (legacy browser).
(ES6 Map - javatpoint)

I think you will find some solutions in the thread mentioned above. In short, you either have to compile your external library with Meteor or run your Cordova as a modern browser.

Screenshot 2024-06-19 at 1.55.17 PM


Thanks for sharing your knowledge, let me try your suggestions :smiling_face:

I have read and found are there instructions to override the packages/ecmascript-runtime-client file? but I can’t find the folder containing it, is it here?


Try recompiling the npm package through Meteor. The babel transform of Meteor might solve your issue

i use Esri-loader package to load Map, Can you give more detailed instructions? :face_holding_back_tears:

Either you load the package as npm or include them in your code so that Meteor can include them for compiling

Why does that error occur, while they run fine on the web but on Cordova android the map cannot be loaded :frowning:

1 Like

upppp , it still not work :frowning: Does anyone have a solution?