title: How to resolve android.os.NetworkOnMainThreadException?
body: <p>I am using 4.0.3 target and I am using ksoap2. The webservice is WCF of Visual Studio 2010 Express.</p>
  
  <p>It Could be an error of soap_action, call or namespace. </p>
  
  <p>I am getting next error each time</p>
  
  <pre><code>05-24 02:49:42.738: W/System.err(5231): android.os.NetworkOnMainThreadException
  05-24 02:49:42.748: W/System.err(5231):     at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1154)
  05-24 02:49:42.748: W/System.err(5231):     at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
  05-24 02:49:42.748: W/System.err(5231):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
  05-24 02:49:42.748: W/System.err(5231):     at java.net.InetAddress.getAllByName(InetAddress.java:214)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.okhttp.internal.Dns$1.getAllByName(Dns.java:28)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:216)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:122)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:292)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
  05-24 02:49:42.748: W/System.err(5231):     at org.ksoap2.transport.ServiceConnectionSE.connect(ServiceConnectionSE.java:46)
  05-24 02:49:42.748: W/System.err(5231):     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:68)
  05-24 02:49:42.748: W/System.err(5231):     at org.tempuri.IAndroid.getAllProductsAndOffers(IAndroid.java:29)
  05-24 02:49:42.748: W/System.err(5231):     at info.android.MapaFragment.GetData(MapaFragment.java:78)
  05-24 02:49:42.748: W/System.err(5231):     at info.android.MapaFragment.onCreateView(MapaFragment.java:64)
  05-24 02:49:42.748: W/System.err(5231):     at android.app.Fragment.performCreateView(Fragment.java:1700)
  05-24 02:49:42.748: W/System.err(5231):     at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:894)
  05-24 02:49:42.748: W/System.err(5231):     at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1066)
  05-24 02:49:42.748: W/System.err(5231):     at android.app.BackStackRecord.run(BackStackRecord.java:684)
  05-24 02:49:42.748: W/System.err(5231):     at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1455)
  05-24 02:49:42.748: W/System.err(5231):     at android.app.FragmentManagerImpl$1.run(FragmentManager.java:447)
  05-24 02:49:42.748: W/System.err(5231):     at android.os.Handler.handleCallback(Handler.java:733)
  05-24 02:49:42.748: W/System.err(5231):     at android.os.Handler.dispatchMessage(Handler.java:95)
  05-24 02:49:42.748: W/System.err(5231):     at android.os.Looper.loop(Looper.java:212)
  05-24 02:49:42.748: W/System.err(5231):     at android.app.ActivityThread.main(ActivityThread.java:5151)
  05-24 02:49:42.748: W/System.err(5231):     at java.lang.reflect.Method.invokeNative(Native Method)
  05-24 02:49:42.748: W/System.err(5231):     at java.lang.reflect.Method.invoke(Method.java:515)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:877)
  05-24 02:49:42.748: W/System.err(5231):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
  05-24 02:49:42.748: W/System.err(5231):     at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>my wsdl is :</p>
  
  <pre><code>&lt;wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" name="Android" targetNamespace="http://tempuri.org/"&gt;
  &lt;wsdl:types&gt;
  &lt;xsd:schema targetNamespace="http://tempuri.org/Imports"&gt;
  &lt;xsd:import schemaLocation="http://localhost:52604/Android.svc?xsd=xsd0" namespace="http://tempuri.org/"/&gt;
  &lt;xsd:import schemaLocation="http://localhost:52604/Android.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/&gt;
  &lt;xsd:import schemaLocation="http://localhost:52604/Android.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/Android"/&gt;
  &lt;/xsd:schema&gt;
  &lt;/wsdl:types&gt;
  &lt;wsdl:message name="IAndroid_EnviarCorreo_InputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:EnviarCorreo"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_EnviarCorreo_OutputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:EnviarCorreoResponse"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_UserPasswordExists_InputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:UserPasswordExists"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_UserPasswordExists_OutputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:UserPasswordExistsResponse"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_UserExists_InputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:UserExists"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_UserExists_OutputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:UserExistsResponse"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_getAllProductsAndOffers_InputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:getAllProductsAndOffers"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_getAllProductsAndOffers_OutputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:getAllProductsAndOffersResponse"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_getProductByOffer_InputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:getProductByOffer"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_getProductByOffer_OutputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:getProductByOfferResponse"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_BuyProductOrOffer_InputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:BuyProductOrOffer"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_BuyProductOrOffer_OutputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:BuyProductOrOfferResponse"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_SetFavouriteOff_InputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:SetFavouriteOff"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_SetFavouriteOff_OutputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:SetFavouriteOffResponse"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_SetFavouriteOn_InputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:SetFavouriteOn"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="IAndroid_SetFavouriteOn_OutputMessage"&gt;
  &lt;wsdl:part name="parameters" element="tns:SetFavouriteOnResponse"/&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:portType name="IAndroid"&gt;
  &lt;wsdl:operation name="EnviarCorreo"&gt;
  &lt;wsdl:input wsaw:Action="http://tempuri.org/IAndroid/EnviarCorreo" message="tns:IAndroid_EnviarCorreo_InputMessage"/&gt;
  &lt;wsdl:output wsaw:Action="http://tempuri.org/IAndroid/EnviarCorreoResponse" message="tns:IAndroid_EnviarCorreo_OutputMessage"/&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="UserPasswordExists"&gt;
  &lt;wsdl:input wsaw:Action="http://tempuri.org/IAndroid/UserPasswordExists" message="tns:IAndroid_UserPasswordExists_InputMessage"/&gt;
  &lt;wsdl:output wsaw:Action="http://tempuri.org/IAndroid/UserPasswordExistsResponse" message="tns:IAndroid_UserPasswordExists_OutputMessage"/&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="UserExists"&gt;
  &lt;wsdl:input wsaw:Action="http://tempuri.org/IAndroid/UserExists" message="tns:IAndroid_UserExists_InputMessage"/&gt;
  &lt;wsdl:output wsaw:Action="http://tempuri.org/IAndroid/UserExistsResponse" message="tns:IAndroid_UserExists_OutputMessage"/&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="getAllProductsAndOffers"&gt;
  &lt;wsdl:input wsaw:Action="http://tempuri.org/IAndroid/getAllProductsAndOffers" message="tns:IAndroid_getAllProductsAndOffers_InputMessage"/&gt;
  &lt;wsdl:output wsaw:Action="http://tempuri.org/IAndroid/getAllProductsAndOffersResponse" message="tns:IAndroid_getAllProductsAndOffers_OutputMessage"/&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="getProductByOffer"&gt;
  &lt;wsdl:input wsaw:Action="http://tempuri.org/IAndroid/getProductByOffer" message="tns:IAndroid_getProductByOffer_InputMessage"/&gt;
  &lt;wsdl:output wsaw:Action="http://tempuri.org/IAndroid/getProductByOfferResponse" message="tns:IAndroid_getProductByOffer_OutputMessage"/&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="BuyProductOrOffer"&gt;
  &lt;wsdl:input wsaw:Action="http://tempuri.org/IAndroid/BuyProductOrOffer" message="tns:IAndroid_BuyProductOrOffer_InputMessage"/&gt;
  &lt;wsdl:output wsaw:Action="http://tempuri.org/IAndroid/BuyProductOrOfferResponse" message="tns:IAndroid_BuyProductOrOffer_OutputMessage"/&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="SetFavouriteOff"&gt;
  &lt;wsdl:input wsaw:Action="http://tempuri.org/IAndroid/SetFavouriteOff" message="tns:IAndroid_SetFavouriteOff_InputMessage"/&gt;
  &lt;wsdl:output wsaw:Action="http://tempuri.org/IAndroid/SetFavouriteOffResponse" message="tns:IAndroid_SetFavouriteOff_OutputMessage"/&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="SetFavouriteOn"&gt;
  &lt;wsdl:input wsaw:Action="http://tempuri.org/IAndroid/SetFavouriteOn" message="tns:IAndroid_SetFavouriteOn_InputMessage"/&gt;
  &lt;wsdl:output wsaw:Action="http://tempuri.org/IAndroid/SetFavouriteOnResponse" message="tns:IAndroid_SetFavouriteOn_OutputMessage"/&gt;
  &lt;/wsdl:operation&gt;
  &lt;/wsdl:portType&gt;
  &lt;wsdl:binding name="BasicHttpBinding_IAndroid" type="tns:IAndroid"&gt;
  &lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http"/&gt;
  &lt;wsdl:operation name="EnviarCorreo"&gt;
  &lt;soap:operation soapAction="http://tempuri.org/IAndroid/EnviarCorreo" style="document"/&gt;
  &lt;wsdl:input&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:input&gt;
  &lt;wsdl:output&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="UserPasswordExists"&gt;
  &lt;soap:operation soapAction="http://tempuri.org/IAndroid/UserPasswordExists" style="document"/&gt;
  &lt;wsdl:input&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:input&gt;
  &lt;wsdl:output&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="UserExists"&gt;
  &lt;soap:operation soapAction="http://tempuri.org/IAndroid/UserExists" style="document"/&gt;
  &lt;wsdl:input&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:input&gt;
  &lt;wsdl:output&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="getAllProductsAndOffers"&gt;
  &lt;soap:operation soapAction="http://tempuri.org/IAndroid/getAllProductsAndOffers" style="document"/&gt;
  &lt;wsdl:input&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:input&gt;
  &lt;wsdl:output&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="getProductByOffer"&gt;
  &lt;soap:operation soapAction="http://tempuri.org/IAndroid/getProductByOffer" style="document"/&gt;
  &lt;wsdl:input&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:input&gt;
  &lt;wsdl:output&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="BuyProductOrOffer"&gt;
  &lt;soap:operation soapAction="http://tempuri.org/IAndroid/BuyProductOrOffer" style="document"/&gt;
  &lt;wsdl:input&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:input&gt;
  &lt;wsdl:output&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="SetFavouriteOff"&gt;
  &lt;soap:operation soapAction="http://tempuri.org/IAndroid/SetFavouriteOff" style="document"/&gt;
  &lt;wsdl:input&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:input&gt;
  &lt;wsdl:output&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  &lt;wsdl:operation name="SetFavouriteOn"&gt;
  &lt;soap:operation soapAction="http://tempuri.org/IAndroid/SetFavouriteOn" style="document"/&gt;
  &lt;wsdl:input&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:input&gt;
  &lt;wsdl:output&gt;
  &lt;soap:body use="literal"/&gt;
  &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  &lt;/wsdl:binding&gt;
  &lt;wsdl:service name="Android"&gt;
  &lt;wsdl:port name="BasicHttpBinding_IAndroid" binding="tns:BasicHttpBinding_IAndroid"&gt;
  &lt;soap:address location="http://localhost:52604/Android.svc"/&gt;
  &lt;/wsdl:port&gt;
  &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>My request xml is:</p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;s:Header&gt;
      &lt;Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none"&gt;http://tempuri.org/IAndroid/getAllProductsAndOffers&lt;/Action&gt;
    &lt;/s:Header&gt;
    &lt;s:Body&gt;
      &lt;getAllProductsAndOffers xmlns="http://tempuri.org/"&gt;
        &lt;province_id&gt;0&lt;/province_id&gt;
        &lt;city_id&gt;0&lt;/city_id&gt;
        &lt;code i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
        &lt;favoritos i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
        &lt;tipo i:nil="true" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" /&gt;
      &lt;/getAllProductsAndOffers&gt;
    &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>My Configuration class:</p>
  
  <pre><code>package org.tempuri;
  
  
  /**
   * Class to configure remote host.
   *
   */
  public final class Configuration {
  
      /**
       * Prohibits instantiation.
       */
      private Configuration(){
      }
  
      /**
       * URL.
       */
  
      private static String NAMESPACE = "http://tempuri.org/";    
      private static String wsUrl = "http://localhost:52604/Android.svc?Wsdl";
  
      /**
       * Configures address of web service, for example
       * &lt;tt&gt;http://localhost:8080/Ws2Ksoap/services/HelloWorld&lt;/tt&gt;.
       *
       * @param wsUrl
       *              The address to access to web service.
       */
      public static void setConfiguration(final String wsUrl) {
          if (wsUrl != null) {
              Configuration.wsUrl = wsUrl;
          }
      }
  
      /**
       *
       * @return The address which the web service is deployed.
       */
      public static String getWsUrl() {
          return wsUrl;
      }
  
      public static String getWsNameSpace() {
          return NAMESPACE;
      }
  }
  </code></pre>
  
  <p>IAndroid class :</p>
  
  <pre><code>package org.tempuri
  
  public class IAndroid {
  
  ...
      public  WcfResponsePOList getAllProductsAndOffers(java.lang.Integer province_id, java.lang.Integer city_id, java.lang.String code, java.lang.String favoritos, java.lang.String tipo) throws Exception {
          String METHOD_NAME = "getAllProductsAndOffers";
  
          SoapObject _client = new SoapObject(Configuration.getWsNameSpace(), METHOD_NAME);
  
          _client.addProperty("province_id", province_id);
          _client.addProperty("city_id", city_id);
          _client.addProperty("code", code);
          _client.addProperty("favoritos", favoritos);
          _client.addProperty("tipo", tipo);
  
          SoapSerializationEnvelope _envelope = new SoapSerializationEnvelope(SoapEnvelope.VER12);
  
          _envelope.dotNet = true;
  
          _envelope.bodyOut = _client;
  
          AndroidHttpTransport _ht = new AndroidHttpTransport(Configuration.getWsUrl());
  
          _ht.call(Configuration.getWsNameSpace() + METHOD_NAME, _envelope);
  
          SoapObject _ret = (SoapObject) _envelope.getResponse();
          int _len = _ret.getPropertyCount();
  
  
          WcfResponsePOList _returned = new WcfResponsePOList();
  
          for (int _i = 0; _i &lt; _len; _i++) {
              _returned.setProperty(_i, _ret.getProperty(_i));        
          }
  
          return _returned;
      }
  ...
  }
  </code></pre>
  
  <p>My Manifest File</p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="info.android"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="14"
          android:targetSdkVersion="16" /&gt;
  
      &lt;permission
          android:name="info.android.permission.MAPS_RECEIVE"
          android:protectionLevel="signature" /&gt;
  
      &lt;uses-permission android:name="info.android.permission.MAPS_RECEIVE" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;    
      &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/&gt;
  
      &lt;uses-feature
          android:glEsVersion="0x00020000"
          android:required="true" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
  
  
  
          &lt;meta-data
              android:name="com.google.android.maps.v2.API_KEY"
              android:value="XXXXXXXXXXXXXXXXXXXXXXXXXX" /&gt;
  
          &lt;meta-data android:name="com.google.android.gms.version" android:value="4323000" /&gt;
  
          &lt;activity
              android:name="info.android.MainActivity"
              android:label="@string/app_name" &gt;
  
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
  
      &lt;/application&gt;
  
  
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Why Am I getting this error?</p>