title: Android native view not working couchbase lite beta 1
body: <p>I am trying to move javascripte views (phonegap project) to native views (android) but the Mapper function doesn't  works with a Couchbase Lite [beta 1] , and view cannot be created.</p>
  
  <p>Code:</p>
  
  <pre><code>private int startCBLListener(int suggestedListenPort) throws IOException,
                                                               CouchbaseLiteException {
  
      Manager manager = startCBLite();
      dbLite=startDatabase(manager, DATABASE_NAME);
  
      com.couchbase.lite.View viewItems = dbLite.getView(String.format("%s/%s",
                                                                       "client",
                                                                       "docView"));
  
      viewItems.setMap(new Mapper() {
          @Override
          public void map(Map&lt;String, Object&gt; document, Emitter emitter) {
              Object type = document.get("type");
  
              if (type.toString()=="CLIE") {
                  emitter.emit(type.toString(), document);
              }
          }
      }, "1.1");
  
      LiteListener listener = new LiteListener(manager, suggestedListenPort);
      int port = listener.getListenPort();
      Thread thread = new Thread(listener);
      thread.start();
  
      return port;
  
  }
  </code></pre>
  
  <p>A GET request to the CouchDB server gives the following results:
  <em> http://localhost:5984/[database]/_design/client</em>
  {"status" : 404}</p>
  
  <p><em> http://localhost:5984/[database]/_design/client/_view/docView</em>
  {"offset":0,"total_rows":0,"rows":[]}</p>
  
  <p><em>Thanks for any help :)</em></p>
  
  <p><strong>Mat2014_</strong></p>