Select to view content in your preferred language

User credentials sample app

1081
1
04-20-2017 05:58 AM
KarpagamElango
New Contributor

User credentials sample app is crashing when you sign in(AppStudio for ArcGIS App Run has stopped working). Further debugging revealed the app is crashing at   map.addLayer(featureLayer); after the featurelayer is initialised. Has anyone already fixed this? Thanks

Tags (1)
0 Kudos
1 Reply
nakulmanocha
Esri Regular Contributor

Please change the line from

map.addLayer(featureLayer);

to

 map.insertLayer(featureLayer,1);

and this should fix the problem. It seems like Runtime is adding a layer but unable to index it correctly and hence crashing.

-Nakul
0 Kudos