title: Android Studio configuration still incorrect along with app stopping in emulator
body: <p>I am trying to build a TTS for a school project. When I click run it says configuration still incorrect. However, the emulator still comes up, but when I click on the app to run it says it has stopped. I am very new to Android Studio so sorry if this seems like a dumb question. Here is what I have: </p>
  
  <pre><code>        package com.example.james.texttospeech;
  
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.view.View;
  import android.widget.EditText;
  import android.speech.tts.TextToSpeech;
  import android.speech.tts.TextToSpeech.OnInitListener;
  import android.content.Intent;
  import java.util.Locale;
  import android.widget.Toast;
  
  public class MainActivity extends Activity implements OnClickListener, OnInitListener {
  
      //TTS object
      private TextToSpeech myTTS;
      //status check code
      private int MY_DATA_CHECK_CODE = 0;
  
      //create the Activity
      public void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          //get a reference to the button element listed in the XML layout
          Button speakButton = (Button)findViewById(R.id.speak);
          //listen for clicks
          speakButton.setOnClickListener(this);
  
          //check for TTS data
          Intent checkTTSIntent = new Intent();
          checkTTSIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);
          startActivityForResult(checkTTSIntent, MY_DATA_CHECK_CODE);
      }
  
      //respond to button clicks
      public void onClick(View v) {
  
          //get the text entered
          EditText enteredText = (EditText)findViewById(R.id.enter);
          String words = enteredText.getText().toString();
          speakWords(words);
      }
  
      //speak the user text
      private void speakWords(String speech) {
  
          //speak straight away
          myTTS.speak(speech, TextToSpeech.QUEUE_FLUSH, null);
      }
  
      //act on result of TTS data check
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  
          if (requestCode == MY_DATA_CHECK_CODE) {
              if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {
                  //the user has the necessary data - create the TTS
                  myTTS = new TextToSpeech(this, this);
              }
              else {
                  //no data - install it now
                  Intent installTTSIntent = new Intent();
                  installTTSIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
                  startActivity(installTTSIntent);
              }
          }
      }
  
      //setup TTS
      public void onInit(int initStatus) {
  
          //check for successful instantiation
          if (initStatus == TextToSpeech.SUCCESS) {
              if(myTTS.isLanguageAvailable(Locale.US)==TextToSpeech.LANG_AVAILABLE)
                  myTTS.setLanguage(Locale.US);
          }
          else if (initStatus == TextToSpeech.ERROR) {
              Toast.makeText(this, "Sorry! Text To Speech failed...", Toast.LENGTH_LONG).show();
          }
      }
  }
  </code></pre>
  
  <p>Here is the logcat I know it's not pretty:</p>
  
  <pre><code>03-05 00:15:46.389    2264-2264/com.example.james.texttospeech D/AndroidRuntime﹕ Shutting down VM
      --------- beginning of crash
  03-05 00:15:46.390    2264-2264/com.example.james.texttospeech E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: com.example.james.texttospeech, PID: 2264
      java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.james.texttospeech/com.example.james.texttospeech.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.james.texttospeech.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.james.texttospeech-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
              at android.app.ActivityThread.access$800(ActivityThread.java:144)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:135)
              at android.app.ActivityThread.main(ActivityThread.java:5221)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
       Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.james.texttospeech.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.james.texttospeech-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
              at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
              at android.app.Instrumentation.newActivity(Instrumentation.java:1065)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
              at android.app.ActivityThread.access$800(ActivityThread.java:144)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:135)
              at android.app.ActivityThread.main(ActivityThread.java:5221)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:372)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
      Suppressed: java.lang.ClassNotFoundException: com.example.james.texttospeech.MainActivity
              at java.lang.Class.classForName(Native Method)
              at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
              at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
              ... 13 more
       Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
  </code></pre>
  
  <p>Here is the AndroidManifest.xml</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.james.texttospeech" &gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name=".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>