<?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 android kotlin Does not display the a simple map in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/android-kotlin-does-not-display-the-a-simple-map/m-p/1093948#M5989</link>
    <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;hello, I have a problem when I tried to display a map with kotlin.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;I have the following code on kotlin and java &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;kotlin:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="kotlin"&gt;class MainActivity : AppCompatActivity() {
    private val activityMainBinding by lazy {
        ActivityMainBinding.inflate(layoutInflater)
    }
    private val mapView: MapView by lazy {
        activityMainBinding.mapView
    }
        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
            setContentView(R.layout.activity_main)

           
            // create a new map with an imagery basemap and set it to the map view
            var map= ArcGISMap(Basemap.Type.STREETS,34.056295,-117.195800,17)
            mapView.map=map
        }
            override fun onPause() {
                mapView.pause()
                super.onPause()
            }

            override fun onResume() {
                super.onResume()
                mapView.resume()
            }

            override fun onDestroy() {
                mapView.dispose()
                super.onDestroy()
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;java:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;public class MainActivity extends AppCompatActivity {
    private MapView mMapView;
    private ArcGISMap map;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // inflate MapView from layout
        mMapView = findViewById(R.id.mapView);
        // create a map with the a topographic basemap
        map= new ArcGISMap(Basemap.Type.STREETS,34.056295,-117.195800,17);
        mMapView.setMap(map);
    }

    @Override
    protected void onPause() {
        mMapView.pause();
        super.onPause();
    }

    @Override
    protected void onResume() {
        super.onResume();
        mMapView.resume();
    }

    @Override
    protected void onDestroy() {
        mMapView.dispose();
        super.onDestroy();
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And the problem is that in java it works perfectly and displays a map well.&amp;nbsp;&lt;SPAN&gt;but in kotlin it doesn't work and show me a blank page and doesn't display a map.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and I follow the documentation step by step.&lt;/P&gt;&lt;P&gt;there is something I missed mabye? I open a new project with kotlin and install all the requirements for this project.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Aug 2021 11:18:42 GMT</pubDate>
    <dc:creator>NivNaory</dc:creator>
    <dc:date>2021-08-31T11:18:42Z</dc:date>
    <item>
      <title>android kotlin Does not display the a simple map</title>
      <link>https://community.esri.com/t5/developers-questions/android-kotlin-does-not-display-the-a-simple-map/m-p/1093948#M5989</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;hello, I have a problem when I tried to display a map with kotlin.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;I have the following code on kotlin and java &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;kotlin:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="kotlin"&gt;class MainActivity : AppCompatActivity() {
    private val activityMainBinding by lazy {
        ActivityMainBinding.inflate(layoutInflater)
    }
    private val mapView: MapView by lazy {
        activityMainBinding.mapView
    }
        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
            setContentView(R.layout.activity_main)

           
            // create a new map with an imagery basemap and set it to the map view
            var map= ArcGISMap(Basemap.Type.STREETS,34.056295,-117.195800,17)
            mapView.map=map
        }
            override fun onPause() {
                mapView.pause()
                super.onPause()
            }

            override fun onResume() {
                super.onResume()
                mapView.resume()
            }

            override fun onDestroy() {
                mapView.dispose()
                super.onDestroy()
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN&gt;java:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;public class MainActivity extends AppCompatActivity {
    private MapView mMapView;
    private ArcGISMap map;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // inflate MapView from layout
        mMapView = findViewById(R.id.mapView);
        // create a map with the a topographic basemap
        map= new ArcGISMap(Basemap.Type.STREETS,34.056295,-117.195800,17);
        mMapView.setMap(map);
    }

    @Override
    protected void onPause() {
        mMapView.pause();
        super.onPause();
    }

    @Override
    protected void onResume() {
        super.onResume();
        mMapView.resume();
    }

    @Override
    protected void onDestroy() {
        mMapView.dispose();
        super.onDestroy();
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And the problem is that in java it works perfectly and displays a map well.&amp;nbsp;&lt;SPAN&gt;but in kotlin it doesn't work and show me a blank page and doesn't display a map.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and I follow the documentation step by step.&lt;/P&gt;&lt;P&gt;there is something I missed mabye? I open a new project with kotlin and install all the requirements for this project.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 11:18:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/android-kotlin-does-not-display-the-a-simple-map/m-p/1093948#M5989</guid>
      <dc:creator>NivNaory</dc:creator>
      <dc:date>2021-08-31T11:18:42Z</dc:date>
    </item>
  </channel>
</rss>

