<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic The ArcGISTiledMapServiceLayer cannot be initialized in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/the-arcgistiledmapservicelayer-cannot-be/m-p/590627#M4080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, in our app, we're using&lt;BR /&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;'com.esri.arcgis.android:arcgis-android:10.2.8-1'.
&lt;/SPAN&gt;All of our maps are created via xml:
&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;com.esri.android.map.MapView
&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:id=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"@+id/map"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:layout_width=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"match_parent"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:layout_height=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"match_parent"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;mapoptions.ZoomLevel=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"13"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;mapoptions.center=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"51.033387, 10.322343" &lt;/SPAN&gt;/&amp;gt;&lt;/PRE&gt;and then we create an ArcGISTiledMapServiceLayer&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.addLayer(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISTiledMapServiceLayer(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FWorld_Street_Map%2FMapServer" target="_blank"&gt;http://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;));

This sometimes leads to a black map, which cannot be used.
Completely killing the app mostly helps.

The error we get is as follows:
EsriStatusException &lt;PRE class="lia-code-sample line-numbers language-none"&gt; 

However i have no clue, WHY the layer cannot be initialized.
Also I would be interested in how to properly deal with this Error, since we logged
several thousand of this Error by now across various users and devices.

The screenshots whows an example. Sometimes the FloatingActionButton, which is anchored to the map, is in the upper left corner, as if the map had no size at all&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;Best Regards, bastischo&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:22:02 GMT</pubDate>
    <dc:creator>SebastianSchöngenesri</dc:creator>
    <dc:date>2021-12-12T01:22:02Z</dc:date>
    <item>
      <title>The ArcGISTiledMapServiceLayer cannot be initialized</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/the-arcgistiledmapservicelayer-cannot-be/m-p/590627#M4080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, in our app, we're using&lt;BR /&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;'com.esri.arcgis.android:arcgis-android:10.2.8-1'.
&lt;/SPAN&gt;All of our maps are created via xml:
&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;com.esri.android.map.MapView
&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:id=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"@+id/map"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:layout_width=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"match_parent"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:layout_height=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"match_parent"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;mapoptions.ZoomLevel=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"13"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;mapoptions.center=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"51.033387, 10.322343" &lt;/SPAN&gt;/&amp;gt;&lt;/PRE&gt;and then we create an ArcGISTiledMapServiceLayer&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mMap&lt;/SPAN&gt;.addLayer(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;ArcGISTiledMapServiceLayer(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FWorld_Street_Map%2FMapServer" target="_blank"&gt;http://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;));

This sometimes leads to a black map, which cannot be used.
Completely killing the app mostly helps.

The error we get is as follows:
EsriStatusException &lt;PRE class="lia-code-sample line-numbers language-none"&gt; 

However i have no clue, WHY the layer cannot be initialized.
Also I would be interested in how to properly deal with this Error, since we logged
several thousand of this Error by now across various users and devices.

The screenshots whows an example. Sometimes the FloatingActionButton, which is anchored to the map, is in the upper left corner, as if the map had no size at all&lt;/PRE&gt;&lt;/PRE&gt;&lt;P&gt;Best Regards, bastischo&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/the-arcgistiledmapservicelayer-cannot-be/m-p/590627#M4080</guid>
      <dc:creator>SebastianSchöngenesri</dc:creator>
      <dc:date>2021-12-12T01:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: The ArcGISTiledMapServiceLayer cannot be initialized</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/the-arcgistiledmapservicelayer-cannot-be/m-p/590628#M4081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right. Yes, with 10.2.8-1 there isn't an easy answer. What you could do is check the validity of the URL and then decide what other known service to add instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At version 100, this becomes a bit easier to handle, as you can loadAsync the service layer, verify that it loads successfully in the doneLoading listener, then from there, decide if it should be added to the map or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this help at all?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2016 19:41:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/the-arcgistiledmapservicelayer-cannot-be/m-p/590628#M4081</guid>
      <dc:creator>EricBader</dc:creator>
      <dc:date>2016-12-30T19:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: The ArcGISTiledMapServiceLayer cannot be initialized</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/the-arcgistiledmapservicelayer-cannot-be/m-p/590629#M4082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It helps with understanding when and why this happens.&lt;/P&gt;&lt;P&gt;But ideally a workaround or fix would be the best solution.&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2017 15:19:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/the-arcgistiledmapservicelayer-cannot-be/m-p/590629#M4082</guid>
      <dc:creator>SebastianSchöngenesri</dc:creator>
      <dc:date>2017-01-04T15:19:06Z</dc:date>
    </item>
  </channel>
</rss>

