title: NoClassDefFoundError Android Project
body: <p>First of all, I know there are plenty of questions/answers about this topic, I've read most of them but still getting the error:</p>
  
  <pre><code>05-17 02:57:06.522: E/AndroidRuntime(17073): java.lang.NoClassDefFoundError: ar.com.package.android.MainActivity
  </code></pre>
  
  <p>The project worked just fine until I updated Eclipse from 21 to 22.</p>
  
  <p>I have tried everything I could: I checked the manifest; Cleaned the project; checked my build path, tried the app in different android version, set java compliance level to 1.6 (libraries too), etc. I just can't figure out what the problem is.</p>
  
  <p>Here's my manifest, I couldn't find anything wrong with it:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="ar.com.package.android"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-feature
      android:glEsVersion="0x00020000"
      android:required="true"/&gt; 
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="17" /&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="com.google.android.providers.gsf.permission.READ_GSERVICES"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
  
  &lt;permission
      android:name="ar.com.package.android.permission.MAPS_RECEIVE"
      android:protectionLevel="signature"/&gt;
  &lt;uses-permission android:name="ar.com.package.android.permission.MAPS_RECEIVE"/&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/Theme.Sherlock.Light.DarkActionBar" 
      android:hardwareAccelerated="true"&gt;
  
  
      &lt;meta-data
  android:name="com.google.android.maps.v2.API_KEY"
  android:value="my key"/&gt;
  
  
      &lt;activity
          android:name="ar.com.package.android.SplashScreen"
          android:label="@string/app_name"
          android:noHistory="true"
          android:screenOrientation="portrait"
          android:theme="@android:style/Theme.Black.NoTitleBar"
          android:windowSoftInputMode="stateHidden"
          &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;activity
          android:name="ar.com.package.android.MainActivity"
          android:logo="@drawable/logo"
          android:screenOrientation="portrait" 
          android:windowSoftInputMode="stateHidden"
           &gt;
      &lt;/activity&gt;
  
      &lt;activity
          android:name="ar.com.package.android.SearchForm"
          android:label="@string/title_activity_search_form"
          android:parentActivityName="ar.com.package.android.MainActivity"
          &gt;
          &lt;meta-data
              android:name="android.support.PARENT_ACTIVITY"
              android:value="ar.com.package.android.MainActivity" /&gt;
      &lt;/activity&gt;
  
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Any help is welcome. I'll keep researching, if I get the answer I'll post it.</p>
  
  <p>EDIT</p>
  
  <p>Here's the MainActivity code:</p>
  
  <pre><code>package ar.com.package.android;
  
  import android.annotation.SuppressLint;
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v4.app.DialogFragment;
  import android.view.KeyEvent;
  import android.view.View;
  import android.widget.Toast;
  import com.actionbarsherlock.view.*;
  import com.google.android.gms.common.ConnectionResult;
  import com.google.android.gms.common.GooglePlayServicesUtil;
  import com.google.android.gms.maps.CameraUpdateFactory;
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.SupportMapFragment;
  import com.google.android.gms.maps.model.LatLng;
  import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
  import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnCloseListener;
  import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.OnOpenListener;
  import com.jeremyfeinstein.slidingmenu.lib.app.SlidingFragmentActivity;
  
  @SuppressLint("NewApi")
  public class MainActivity extends SlidingFragmentActivity {
  
  private SlidingMenu menu;
  private Toast toast;
  private long lastBackPressTime = 0;
  private GoogleMap map;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      // slidemenu
      setBehindContentView(R.layout.menu);
  
      setSlidingActionBarEnabled(false);
  
      menu = getSlidingMenu();
      menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
      menu.setShadowWidthRes(R.dimen.shadow_width);
      menu.setShadowDrawable(R.drawable.shadow);
      menu.setBehindOffset(100);
      menu.setFadeDegree(0.35f);
      menu.setSlidingEnabled(false);
  
      menu.setOnCloseListener(new OnCloseListener() {
          @Override
          public void onClose() {
              menu.setSlidingEnabled(false);
          }
      });
  
      menu.setOnOpenListener(new OnOpenListener() {
          @Override
          public void onOpen() {
              menu.setSlidingEnabled(true);
          }
      });
  
      getSupportActionBar().setDisplayShowCustomEnabled(true);
      getSupportActionBar().setDisplayHomeAsUpEnabled(false);
  
      // ---slide menu
  
      map = ((SupportMapFragment) getSupportFragmentManager()
              .findFragmentById(R.id.map)).getMap();
  
      // Getting Google Play availability status
      int status = GooglePlayServicesUtil
              .isGooglePlayServicesAvailable(getBaseContext());
  
      if (status != ConnectionResult.SUCCESS) {
  
          Toast.makeText(this, "Google Maps no esta disponible.",
                  Toast.LENGTH_LONG).show();
  
      } else {
  
  
          map.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(
                  -26.8175915814614, -65.22274105834958), 13));
  
          // Enabling MyLocation Layer of Google Map
          map.setMyLocationEnabled(true);
      }
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getSupportMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
      case android.R.id.home:
          toggle();
          return true;
  
      case R.id.action_search:
          final int RESULT = 1;
          startActivityForResult(new Intent(MainActivity.this,
                  SearchForm.class), RESULT);
          return true;
  
      case R.id.action_lineas:
          showDialogLineas();
          return true;
  
      case R.id.action_acercade:
          showDialogAcercaDe();
          return true;
      }
      return super.onOptionsItemSelected(item);
  }
  
  @Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {
      if (keyCode == KeyEvent.KEYCODE_BACK &amp;&amp; !menu.isMenuShowing()) {
  
          if (this.lastBackPressTime &lt; System.currentTimeMillis() - 4000) {
              toast = Toast.makeText(this,
                      "Presione Atrás nuevamente para cerrar",
                      Toast.LENGTH_LONG);
              toast.show();
              this.lastBackPressTime = System.currentTimeMillis();
          } else {
              if (toast != null) {
                  toast.cancel();
              }
              super.onBackPressed();
          }
  
          return true;
      }
      return super.onKeyDown(keyCode, event);
  }
  
  public void onResultadosClicked(View view) {
      showMenu();
  }
  
  public void showDialogLineas(){
      DialogFragment dialog = new LineasDialog();
      dialog.show(getSupportFragmentManager(), "Lineas");
  }
  
  public void showDialogAcercaDe(){
      DialogFragment dialog = new AcercaDeDialog();
      dialog.show(getSupportFragmentManager(), "Acerca");
  }
  }
  </code></pre>