I've got the same piece of code in two apps.
In the test app, the portalItem is shown.
In the main app I'm working on, it is not. Other operational layers like WMS are in fact shown.


ArcGISMap map = new ArcGISMap(SpatialReferences.getWebMercator());
map.setBasemap(Basemap.createTopographicVector());
MapView mapView = view.findViewById(R.id.testmap);
mapView.setMap(map);
Portal portal = new Portal("https://www.arcgis.com");
PortalItem portalItem = new PortalItem(portal, "257f279bf6a5461e88db07f54aa85d71");
portalItem.loadAsync();
portalItem.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
if (portalItem.getLoadStatus().equals(LoadStatus.FAILED_TO_LOAD)) {
portalItem.retryLoadAsync();
} else if (portalItem.getLoadStatus().equals(LoadStatus.LOADED)) {
FeatureLayer featureLayer = new FeatureLayer(portalItem);
Viewpoint viewpoint = new Viewpoint(36.7324863, -4.46812351, 500);
mapView.setViewpointAsync(viewpoint);
mapView.getMap().getOperationalLayers().add(featureLayer);
}
}
});
I'm a bit confused, as the code is the same, but the results are not. Any sort of guidance to find the root of the problem would be welcome. It is not the license, as I've tried with the same developer test license, with the same result, as well.
Thank you.
UPDATE EDIT:
It would seem that the license did make more of an effect than I thought. It is still weird. I have a separate map that I made, isolated, and with the development API KEY, it does work, as opposed with my LITE license. I do not understand, as I was under the impression that the LITE license would work with most of PortalItem's and FeatureLayer's methods.
Thing is, after I've loaded and drawn the PortalItem FeatureLayer, after I go to the app's "main map", it is drawn, but with really thick lines.


I do not know why I need to draw it into a different map, before getting drawn again. Further ideas and clarifications would be welcome.