title: Type Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException
body: <p>I am making a simple map application but on running it, errors are displayed which i   don't understand.... </p>
  
  <p>my project min SDK is android 2.2(Froyo) API 8 , target SDK is android   4.4(kitkat) API 19 and app is compiled with Google API 2 rev 8.....</p>
  
  <p>I really don't know what should be the combinations of min, target and compiled apis in   order to make my app run ....help me out with the proper combination.</p>
  
  <p>following is my manifest file code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.margallahillhikedroid"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="19" /&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="android.permission.INTERNET"/&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;uses-library android:name="com.google.android.maps"/&gt;"
      &lt;activity
          android:name="com.example.margallahillhikedroid.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>// following is main java source</p>
  
  <p>// package com.example.margallahillhikedroid;</p>
  
  <pre><code>import com.google.android.maps.MapActivity;
  import com.google.android.maps.MapView;
  
  import android.os.Bundle;
  
  import android.view.Menu;
  
  public class MainActivity extends MapActivity {
  MapView map;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      map=(MapView)findViewById(R.id.mymap);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  @Override
  protected boolean isRouteDisplayed() {
      // TODO Auto-generated method stub
      return false;
  }
  
  }
  </code></pre>
  
  <p>following is main.xml</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" &gt;
  &lt;com.google.android.maps.MapView
        android:id="@+id/mymap"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:apiKey="AIzaSyBcTxeirTSzthVlMal5JDDC-SK-Mw7s_CE"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>on running the app following errors in console section displayed;</p>
  
  <pre><code>[2014-04-14 07:37:14 - MargallahillHikedroid] Dx 
  trouble writing output: already prepared
  [2014-04-14 07:37:14 - Dex Loader] Unable to execute dex:     java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
  [2014-04-14 07:37:14 - MargallahillHikedroid] Conversion to Dalvik format failed:    Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack   trace.
  </code></pre>
  
  <p>in the problem section following error is displayed</p>
  
  <pre><code>Description Resource    Path    Location    Type
  Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. MargallahillHikedroid       Unknown Android Packaging Problem
  </code></pre>
  
  <p>I am making a map application but on running it above mentioned errors are displayed in the problem section as well as the console section.</p>