title: Unable to get provider
body: <p>I have problem with getting the provider. I search for an answer but still i can't have the right answer. Please help me with this.
  Here is my manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest
  package="com.ultramegatech.ey"
  xmlns:android="http://schemas.android.com/apk/res/android"
  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.VIBRATE" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/icon"
      android:label="@string/app_name"
      android:theme="@style/LightTheme"&gt;
      &lt;provider
          android:name="com.ultramegatech.ey.provider.ElementsProvider"
          android:authorities="com.ultramegatech.ey.provider"
          android:multiprocess="true"
          android:exported="false" /&gt;
  
      &lt;activity
          android:name="PeriodicTableActivity"
          android:label="@string/app_name"
          android:screenOrientation="landscape"
          android:theme="@style/LightTheme.NoTitleBar"&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="ElementListActivity"
          android:label="@string/titleElementList" /&gt;
      &lt;activity
          android:name="ElementDetailsActivity"
          android:label="@string/app_name" /&gt;
      &lt;activity
          android:name="EyPreferenceActivity"
          android:label="@string/titlePreferences" /&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>My Database Provider</p>
  
  <pre><code>package com.ultramegatech.ey.provider;
  
  import android.content.ContentProvider;
  import android.content.ContentUris;
  import android.content.ContentValues;
  import android.content.UriMatcher;
  import android.database.Cursor;
  import android.database.SQLException;
  import android.database.sqlite.SQLiteDatabase;
  import android.database.sqlite.SQLiteQueryBuilder;
  import android.net.Uri;
  
  /**
  * ContentProvider for accessing the chemical element database.
  * 
  * @author Steve Guidetti
  */
  public class ElementsProvider extends ContentProvider {
  /* Provider authority */
  
  public static final String AUTHORITY = "com.ultramegatech.ey.provider";
  
  /* Uri matcher ids */
  private static final int ELEMENTS = 1;
  private static final int ELEMENTS_ID = 2;
  private static final int ELEMENTS_NUMBER = 3;
  private static final int ELEMENTS_SYMBOL = 4;
  private static final int ELEMENTS_FILTER = 5;
  
  /* Uri matcher */
  private static final UriMatcher sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
  static {
      sUriMatcher.addURI(AUTHORITY, "elements", ELEMENTS);
      sUriMatcher.addURI(AUTHORITY, "elements/#", ELEMENTS_ID);
      sUriMatcher.addURI(AUTHORITY, "elements/n/#", ELEMENTS_NUMBER);
      sUriMatcher.addURI(AUTHORITY, "elements/s/*", ELEMENTS_SYMBOL);
      sUriMatcher.addURI(AUTHORITY, "elements/filter/*", ELEMENTS_FILTER);
  }
  
  /* SQLiteOpenHelper */
  private DatabaseOpenHelper mDatabaseOpenHelper;
  
  @Override
  public boolean onCreate() {
      mDatabaseOpenHelper = new DatabaseOpenHelper(getContext());
      return true;
  }
  
  @Override
  public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
          String sortOrder) {
      final SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
      switch(sUriMatcher.match(uri)) {
          case ELEMENTS:
              qb.setTables(Elements.TABLE_NAME);
              break;
          case ELEMENTS_ID:
              qb.setTables(Elements.TABLE_NAME);
              qb.appendWhere(Elements._ID + " = " + uri.getLastPathSegment());
              break;
          case ELEMENTS_NUMBER:
              qb.setTables(Elements.TABLE_NAME);
              qb.appendWhere(Elements.NUMBER + " = " + uri.getLastPathSegment());
              break;
          case ELEMENTS_SYMBOL:
              qb.setTables(Elements.TABLE_NAME);
              qb.appendWhere(Elements.SYMBOL + " = ");
              qb.appendWhereEscapeString(uri.getLastPathSegment());
              break;
          case ELEMENTS_FILTER:
              qb.setTables(Elements.TABLE_NAME);
              qb.appendWhere(Elements.NAME + " LIKE ");
              qb.appendWhereEscapeString(uri.getLastPathSegment() + "%");
              qb.appendWhere(" OR " + Elements.SYMBOL + " LIKE ");
              qb.appendWhereEscapeString(uri.getLastPathSegment() + "%");
              break;
          default:
              throw new IllegalArgumentException("Invalid URI: " + uri.toString());
      }
  
      final SQLiteDatabase db = mDatabaseOpenHelper.getReadableDatabase();
      final Cursor cursor = qb.query(db, projection, selection, selectionArgs, null, null,
              sortOrder);
      cursor.setNotificationUri(getContext().getContentResolver(), uri);
      return cursor;
  }
  
  @Override
  public String getType(Uri uri) {
      switch(sUriMatcher.match(uri)) {
          case ELEMENTS:
          case ELEMENTS_FILTER:
              return Elements.DATA_TYPE;
          case ELEMENTS_ID:
          case ELEMENTS_NUMBER:
          case ELEMENTS_SYMBOL:
              return Elements.DATA_TYPE_ITEM;
          default:
              return null;
      }
  }
  
  @Override
  public Uri insert(Uri uri, ContentValues values) {
      String table;
      switch(sUriMatcher.match(uri)) {
          case ELEMENTS:
              table = Elements.TABLE_NAME;
              break;
          default:
              throw new IllegalArgumentException("Invalid URI");
      }
  
      final SQLiteDatabase db = mDatabaseOpenHelper.getWritableDatabase();
      final long rowId = db.insert(table, null, values);
      if(rowId &gt; 0) {
          getContext().getContentResolver().notifyChange(uri, null);
          return ContentUris.withAppendedId(uri, rowId);
      }
  
      throw new SQLException("Failed to insert row into " + uri.toString());
  }
  
  @Override
  public int delete(Uri uri, String selection, String[] selectionArgs) {
      String table;
      switch(sUriMatcher.match(uri)) {
          case ELEMENTS:
              table = Elements.TABLE_NAME;
              break;
          case ELEMENTS_ID:
              table = Elements.TABLE_NAME;
              final String id = uri.getLastPathSegment();
              if(selection == null) {
                  selection = Elements._ID + " = " + id;
              } else {
                  selection += " AND " + Elements._ID + " = " + id;
              }
              break;
          case ELEMENTS_NUMBER:
              table = Elements.TABLE_NAME;
              final String number = uri.getLastPathSegment();
              if(selection == null) {
                  selection = Elements.NUMBER + " = " + number;
              } else {
                  selection += " AND " + Elements.NUMBER + " = " + number;
              }
              break;
          default:
              throw new IllegalArgumentException("Invalid URI");
      }
  
      final SQLiteDatabase db = mDatabaseOpenHelper.getWritableDatabase();
      final int rowsAffected = db.delete(table, selection, selectionArgs);
      getContext().getContentResolver().notifyChange(uri, null);
      return rowsAffected;
  }
  
  @Override
  public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
      String table;
      switch(sUriMatcher.match(uri)) {
          case ELEMENTS:
              table = Elements.TABLE_NAME;
              break;
          case ELEMENTS_ID:
              table = Elements.TABLE_NAME;
              final String id = uri.getLastPathSegment();
              if(selection == null) {
                  selection = Elements._ID + " = " + id;
              } else {
                  selection += " AND " + Elements._ID + " = " + id;
              }
              break;
          case ELEMENTS_NUMBER:
              table = Elements.TABLE_NAME;
              final String number = uri.getLastPathSegment();
              if(selection == null) {
                  selection = Elements.NUMBER + " = " + number;
              } else {
                  selection += " AND " + Elements.NUMBER + " = " + number;
              }
              break;
          default:
              throw new IllegalArgumentException("Invalid URI");
      }
  
      final SQLiteDatabase db = mDatabaseOpenHelper.getWritableDatabase();
      final int rowsAffected = db.update(table, values, selection, selectionArgs);
      getContext().getContentResolver().notifyChange(uri, null);
      return rowsAffected;
  }
  }
  </code></pre>
  
  <p>Here is the Logcat:</p>
  
  <blockquote>
    <p>02-12 06:00:42.041: E/AndroidRuntime(1245):
    java.lang.RuntimeException: Unable to get provider
    com.ultramegatech.ey.provider: java.lang.ClassNotFoundException:
    Didn't find class "com.ultramegatech.ey.provider" on path:
    DexPathList[[zip file
    "/data/app/com.ultramegatech.ey-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ultramegatech.ey-1,
    /system/lib]]
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.app.ActivityThread.installProvider(ActivityThread.java:4774)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.app.ActivityThread.installContentProviders(ActivityThread.java:4366)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4306)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.app.ActivityThread.access$1400(ActivityThread.java:135)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1457)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.os.Handler.dispatchMessage(Handler.java:102)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.os.Looper.loop(Looper.java:137)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.app.ActivityThread.main(ActivityThread.java:4998)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at java.lang.reflect.Method.invokeNative(Native Method)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at java.lang.reflect.Method.invoke(Method.java:515)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at dalvik.system.NativeStart.main(Native Method)
        02-12 06:00:42.041: E/AndroidRuntime(1245): Caused by: java.lang.ClassNotFoundException: Didn't find class
    "com.ultramegatech.ey.provider" on path: DexPathList[[zip file
    "/data/app/com.ultramegatech.ey-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ultramegatech.ey-1,
    /system/lib]]
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   at android.app.ActivityThread.installProvider(ActivityThread.java:4759)
        02-12 06:00:42.041: E/AndroidRuntime(1245):   ... 12 more
        02-12 06:00:54.471: I/Process(1245): Sending signal. PID: 1245 SIG: 9</p>
  </blockquote>
  
  <p>My .sql is on the raw folder if it has regards with the problem.
  I just get the code in gitHub and i will modify it for my thesis. Thanks and your answers will be much appreciated. Thanks in advance!</p>