<?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 error in my first application in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586731#M4021</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, i new in this arcgis runtime SDk for android. i have this problem where i get 'ArcGISTiledMapServiceLayer cannot be resolved to a type' and need to add 'import com.esri.android.map.ags.ArcGISTiledMapServiceLayer;' in Activity.java to resolve the error. Here is my code. Did i do the right way? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;package com.esri.arcgis.android.samples.helloworld;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import android.app.Activity;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import android.os.Bundle;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.esri.android.map.MapView;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.esri.android.map.ags.ArcGISTiledMapServiceLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public class HelloWorldActivity extends Activity {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MapView mMapView;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; /** Called when the activity is first created. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public void onCreate(Bundle savedInstanceState) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; super.onCreate(savedInstanceState);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setContentView(R.layout.main);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView = new MapView(this);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; // Retrieve the map and initial extent from XML layout&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView = (MapView)findViewById(R.id.map);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; // Add dynamic layer to MapView&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView.addLayer(new ArcGISTiledMapServiceLayer("" +&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" rel="nofollow" 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;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; protected void onDestroy() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; super.onDestroy();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; protected void onPause() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; super.onPause();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView.pause();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; protected void onResume() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; super.onResume();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView.unpause();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Dec 2013 02:41:24 GMT</pubDate>
    <dc:creator>ArowanaIndah</dc:creator>
    <dc:date>2013-12-13T02:41:24Z</dc:date>
    <item>
      <title>error in my first application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586731#M4021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, i new in this arcgis runtime SDk for android. i have this problem where i get 'ArcGISTiledMapServiceLayer cannot be resolved to a type' and need to add 'import com.esri.android.map.ags.ArcGISTiledMapServiceLayer;' in Activity.java to resolve the error. Here is my code. Did i do the right way? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;package com.esri.arcgis.android.samples.helloworld;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import android.app.Activity;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import android.os.Bundle;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.esri.android.map.MapView;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.esri.android.map.ags.ArcGISTiledMapServiceLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;public class HelloWorldActivity extends Activity {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MapView mMapView;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; /** Called when the activity is first created. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public void onCreate(Bundle savedInstanceState) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; super.onCreate(savedInstanceState);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; setContentView(R.layout.main);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView = new MapView(this);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; // Retrieve the map and initial extent from XML layout&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView = (MapView)findViewById(R.id.map);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; // Add dynamic layer to MapView&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView.addLayer(new ArcGISTiledMapServiceLayer("" +&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" rel="nofollow" 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;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; protected void onDestroy() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; super.onDestroy();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; protected void onPause() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; super.onPause();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView.pause();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; @Override&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; protected void onResume() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; super.onResume();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mMapView.unpause();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 02:41:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586731#M4021</guid>
      <dc:creator>ArowanaIndah</dc:creator>
      <dc:date>2013-12-13T02:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: error in my first application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586732#M4022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm guessing that you may have started by following this tutorial, as the names and code suggested here is consistent with your code: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/android/guide/hello-world.htm" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/en/android/guide/hello-world.htm&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The "import" line that you suggested looks correct, and you should find that this runs OK and creates a simple app with a single layer of streets in it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One difference however is that in your onCreate, the mMapView variable is set twice - first a new MapView is created in code, and then secondly a MapView is retrieved from a layout by ID.&amp;nbsp; Possibly this is just an error when you cut and pasted the code sample from the tutorial. As described in this tutorial, the simplest way to get started would be to use the second approach, where a MapView is added in the layout, and then you get a reference to the MapView from the layout by it's ID. So you can remove the line "mMapView = new MapView(this);".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2013 10:41:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586732#M4022</guid>
      <dc:creator>ShellyGill1</dc:creator>
      <dc:date>2013-12-17T10:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: error in my first application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586733#M4023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if I do not have the double mMapView cause I put as a comment this line //mMapView = new MapView(this);&lt;/P&gt;&lt;P&gt;What I am missing in the code or libraries cause I still having an error in the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcGISTiledMapServiceLayer cannot be resolved to a type&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 18:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586733#M4023</guid>
      <dc:creator>Oscar_ReneCarrillo_Garcia</dc:creator>
      <dc:date>2014-07-22T18:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: error in my first application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586734#M4024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oscar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have the correct imports statements, then it sounds likely that you don't have the Jar files in your build path that contain all the Esri classes - you can add these automatically if you have the ArcGIS Runtime SDK for Android installed in Eclipse - right-click the project and choose ArcGIS Tools -&amp;gt; Convert to ArcGIS Android Project. If that's option is disabled, maybe your project already had this reference but it's been broken somehow, so in that case choose Fix Project Properties instead.&lt;/P&gt;&lt;P&gt;The doc here will tell you more about this: &lt;A href="https://developers.arcgis.com/android/guide/integration-features.htm#ESRI_SECTION1_D7251B4BE9C54E899CE2A90B420B0CF7" title="https://developers.arcgis.com/android/guide/integration-features.htm#ESRI_SECTION1_D7251B4BE9C54E899CE2A90B420B0CF7"&gt;Integration features—ArcGIS Runtime SDK for Android&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 08:24:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586734#M4024</guid>
      <dc:creator>ShellyGill1</dc:creator>
      <dc:date>2014-07-23T08:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: error in my first application</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586735#M4025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer I though that was another thing but this could help to someone that was missing this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 15:06:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/error-in-my-first-application/m-p/586735#M4025</guid>
      <dc:creator>Oscar_ReneCarrillo_Garcia</dc:creator>
      <dc:date>2014-07-23T15:06:19Z</dc:date>
    </item>
  </channel>
</rss>

