Notes about Map Data
Vector Features from ESRI Shapefile (SHP) and FileGeodatabase must be inside a zipfile and data must be UnProjected EPSG:4326 Geographic WGS84 (GCS_WGS_1984). Each zip file can only contain one shapefile or one filegdb and no subfolders.
If you have an entire folder of shapefiles you want to include in the app, then simply use GDAL’s OGR2OGR to convert to OGC GeoPackage Format. https://www.gdal.org/ogr2ogr.html
For ESRI Map Services do not include at the end of the URL any query parameters (/query?outFields=*&where=1%3D1).
End with the ServiceType/LayerID