title: Failed to find provider info for <custom provider>
body: <p>I have read just about everything there is to find here on this issue, not getting past this.</p>
  <p>I have a simple app starting with the <code>MainActivity</code>, my <code>Content Provider</code> is correctly defined in <code>AndroidManifest.xml</code>, the <code>ContentProvider</code> class seems alrighty...this has been tested on a nexus i9250 running 4.3 and an Asus Memo Pad running 4.2.1 as well as VDevices running Jelly Bean. The App runs in every instance and does not crash, the only thing the <code>LogCat</code> gives me is <code>&quot;Failed to find provider info for de.somename.provider&quot;</code> at the point where one of my fragments tries to query the <code>Content Provider</code> and get a cursor. Here the Code:</p>
  <p><strong>AndroidManifest.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      package=&quot;de.somename.hvk3&quot;
      android:versionCode=&quot;1&quot;
      android:versionName=&quot;1.0&quot; &gt;
  
      &lt;uses-sdk android:minSdkVersion=&quot;14&quot;
                android:targetSdkVersion=&quot;18&quot; /&gt;
  
      &lt;application android:allowBackup=&quot;true&quot;
                   android:icon=&quot;@drawable/ic_launcher&quot;
                   android:label=&quot;@string/app_name&quot;
                   android:theme=&quot;@style/AppTheme&quot; &gt;
          &lt;activity android:name=&quot;de.somename.hvk3.MainActivity&quot;
                    android:label=&quot;@string/app_name&quot; &gt;
                    &lt;intent-filter&gt;
                        &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
                        &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
                    &lt;/intent-filter&gt;&lt;/activity&gt;
          &lt;activity android:name=&quot;de.somename.hvk3.UserSettingActivity&quot;
                    android:label=&quot;@string/settings&quot; &gt;&lt;/activity&gt;
          &lt;provider android:authorities=&quot;de.somename.provider&quot;
                    android:enabled=&quot;true&quot;
                    android:multiprocess=&quot;true&quot;
                    android:name=&quot;.hvkContentProvider&quot;
                    android:exported=&quot;true&quot; &gt;&lt;/provider&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  <p><strong>hvkContentProvider.java</strong></p>
  <pre><code>public class hvkContentProvider extends ContentProvider {
  
      private static final String DATABASE_NAME = &quot;hvkDB&quot;;
      private static final int DATABASE_VERSION = 1;
      public static final String Authority = &quot;de.somename.provider&quot;;
      public static final String ElementPath = &quot;/hv_kontakte&quot;;
      public static final Uri CONTENT_URI = Uri.parse(&quot;content://&quot; + Authority + ElementPath);
      private static final int ALLROWS = 1;
      private static final int SINGLE_ROW = 2;
      
      private static final UriMatcher suriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
      static{
          suriMatcher.addURI(&quot;de.somename.provider&quot;, ElementPath, ALLROWS);
          suriMatcher.addURI(&quot;de.somename.provider&quot;, ElementPath + &quot;/#&quot;, SINGLE_ROW);
      }
      
      public static final String KEY_ID = &quot;_id&quot;;
      public static final String KEY_TYPE = &quot;type&quot;;
      public static final String KEY_CLTYP = &quot;cltyp&quot;;
      public static final String KEY_MDT = &quot;mdt&quot;;
      public static final String KEY_OBJ = &quot;obj&quot;;
      public static final String KEY_VTR = &quot;vtr&quot;;
      public static final String KEY_FKZ = &quot;fkz&quot;;
      public static final String KEY_NAME = &quot;name&quot;;
      public static final String KEY_VNAME = &quot;vname&quot;;
      public static final String KEY_TEL = &quot;tel&quot;;
      public static final String KEY_FAX = &quot;fax&quot;;
      public static final String KEY_MOBIL = &quot;mobil&quot;;
      public static final String KEY_EMAIL = &quot;email&quot;;
      
      private MySQLiteOpenHelper myOpenHelper;
      
      @Override
      public boolean onCreate() {
          
          myOpenHelper = new MySQLiteOpenHelper(getContext(), DATABASE_NAME, null, DATABASE_VERSION);
          return true;
      }
      
      @Override
      public Cursor query(Uri uri, String[] projection, String selection,
              String[] selectionArgs, String sortOrder) {
          
          SQLiteDatabase db = myOpenHelper.getReadableDatabase();
          
          String groupBy = null;
          String having = null;
          SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder();
          queryBuilder.setTables(MySQLiteOpenHelper.DATABASE_TABLE);
          
          switch(suriMatcher.match(uri)){
          case SINGLE_ROW:
              String rowID = uri.getPathSegments().get(1);
              queryBuilder.appendWhere(KEY_ID + &quot;=&quot; + rowID);
          default: break;
          }
          
          Cursor cursor = queryBuilder.query(db, projection, selection, selectionArgs, groupBy, having, sortOrder);
          
          return cursor;
      }
      
      @Override
      public int delete(Uri uri, String selection, String[] selectionArgs) {
          SQLiteDatabase db = myOpenHelper.getWritableDatabase();
          switch(suriMatcher.match(uri)){
          case SINGLE_ROW:
              String rowID = uri.getPathSegments().get(1);
              selection = KEY_ID + &quot;=&quot; + rowID
                      + (!TextUtils.isEmpty(selection) ?
                      &quot; AND (&quot; + selection + ')' : &quot;&quot;);
          default: break;
          }
          //To return the number of deleted items you must specify a where clause. To delete all rows and return a value pass in &quot;1&quot;
          if (selection == null)
              selection = &quot;1&quot;;
          
          return db.delete(MySQLiteOpenHelper.DATABASE_TABLE, selection, selectionArgs);
      }
      
      @Override
      public Uri insert(Uri uri, ContentValues values) {
          
          SQLiteDatabase db = myOpenHelper.getWritableDatabase();
          String nullColumnHack = null;
          long id = db.insert(MySQLiteOpenHelper.DATABASE_TABLE, nullColumnHack, values);
          
          if(id &gt; -1){
              Uri insertedId = ContentUris.withAppendedId(CONTENT_URI, id);
              getContext().getContentResolver().notifyChange(insertedId, null);
              return insertedId;
          }
          else
              return null;
      }
      
      @Override
      public int update(Uri uri, ContentValues values, String selection,
              String[] selectionArgs) {
          
          SQLiteDatabase db = myOpenHelper.getWritableDatabase();
          
          switch(suriMatcher.match(uri)){
          case SINGLE_ROW:
              String rowID = uri.getPathSegments().get(1);
              selection = KEY_ID + &quot;=&quot; + rowID
                  + (!TextUtils.isEmpty(selection) ?
                  &quot; AND (&quot; + selection + ')' : &quot;&quot;);
          default: break;
          }
          
          return db.update(MySQLiteOpenHelper.DATABASE_TABLE, values, selection, selectionArgs);
      }
  
      @Override
      public String getType(Uri uri) {
          switch(suriMatcher.match(uri)){
          case ALLROWS:
              return &quot;vnd.android.cursor.dir/vnd.somename.contacts&quot;;
          case SINGLE_ROW:
              return &quot;vnd.android.cursor.item/vnd.somename.contacts&quot;;
          default:
              throw new IllegalArgumentException(&quot;Unsupported URI: &quot; + uri);
          }
      }
      
      @Override
      public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
          
          //Find the row ID and use it as a filename
          String rowID = uri.getPathSegments().get(1);
          
          //Create a file object in the applications external files directory
          String picsDir = Environment.DIRECTORY_PICTURES;
          File file = new File(getContext().getExternalFilesDir(picsDir), rowID);
          
          if(!file.exists()) {
              try{
                  file.createNewFile();
              } catch (IOException e) {
                  //Log.d(TAG, &quot;File creation failed: &quot; + e.getMessage());
              }
          }
          
          //Translate the mode parameter to the corresponding Parcel File Descriptor open mode
          int fileMode = 0;
          if(mode.contains(&quot;w&quot;))
              fileMode |= ParcelFileDescriptor.MODE_WRITE_ONLY;
          if(mode.contains(&quot;r&quot;))
              fileMode |= ParcelFileDescriptor.MODE_READ_ONLY;
          if(mode.contains(&quot;+&quot;))
              fileMode |= ParcelFileDescriptor.MODE_APPEND;
          
          return ParcelFileDescriptor.open(file, fileMode);
      }
      
      private class MySQLiteOpenHelper extends SQLiteOpenHelper {     //used to be static
          
          public static final String DATABASE_TABLE = &quot;hv_kontakte&quot;;
          private static final String DATABASE_CREATE = 
                  &quot;CREATE TABLE &quot; + DATABASE_TABLE + &quot;(&quot; + KEY_ID + &quot; INTEGER PRIMARY KEY AUTOINCREMENT, &quot; +
                          KEY_TYPE + &quot; TEXT, &quot; + KEY_CLTYP + &quot; TEXT, &quot; + KEY_MDT + &quot; INTEGER, &quot; + KEY_OBJ + &quot; INTEGER, &quot;
                          + KEY_VTR + &quot; INTEGER, &quot; + KEY_FKZ + &quot; INTEGER, &quot; + KEY_NAME + &quot; TEXT, &quot; + KEY_VNAME + &quot; TEXT, &quot;
                          + KEY_TEL + &quot; TEXT, &quot; + KEY_FAX + &quot; TEXT, &quot; + KEY_MOBIL + &quot; TEXT, &quot; + KEY_EMAIL + &quot; TEXT)&quot;;
          
          public MySQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version){
              super(context, DATABASE_NAME, null, DATABASE_VERSION);
          }
          
          @Override
          public void onCreate(SQLiteDatabase database) {
              database.execSQL(DATABASE_CREATE);
              hvkContentProvider.this.insertSomeContacts();
          }
      
          @Override
          public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) {
              database.execSQL(&quot;DROP TABLE IF EXISTS&quot; + DATABASE_TABLE);
              onCreate(database);
          }
      }
  }
  </code></pre>
  <p><strong>HdwFragment.java</strong></p>
  <pre><code>public class HdwFragment extends Fragment{
  
      private SimpleCursorAdapter hdwDataAdapter;
      private ListView listview;
      public static final String ARG_SECTION_NUMBER = &quot;section_number&quot;;
      private static final String TAG = &quot;HdwFragment&quot;;
      public HdwFragment(){}
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState){
          
          Context context = getActivity();
          View rootView = inflater.inflate(R.layout.fragment_all,container, false);
          TextView dummyTextView = (TextView) rootView.findViewById(R.id.section_label);
          dummyTextView.setText(&quot;Dienstleister&quot;);
          //android.support.v4.app.LoaderManager loaderManager = getLoaderManager();
          
          Log.i(TAG, &quot;Before getContentResolver&quot;);
          ContentResolver cr = context.getContentResolver();
          Log.i(TAG, &quot;Before result_columns&quot;);
          String[] result_columns = new String[] {
                  hvkContentProvider.KEY_ID,
                  hvkContentProvider.KEY_TYPE,
                  hvkContentProvider.KEY_CLTYP,
                  hvkContentProvider.KEY_NAME,
                  hvkContentProvider.KEY_VNAME
          };
          Log.i(TAG, &quot;Before where,whereArgs and order&quot;);
          String where = null;
          String whereArgs[] = null;
          String order = null;
          Log.i(TAG, &quot;Before resultCursor action&quot;);
          Log.i(TAG, &quot;hvkContentProvider URI: &quot; + hvkContentProvider.CONTENT_URI);
          Cursor resultCursor = cr.query(hvkContentProvider.CONTENT_URI, result_columns, where, whereArgs, order);
          Log.i(TAG, &quot;resultCursor = &quot; + resultCursor);
          Log.i(TAG, &quot;Before fromColumns&quot;);
          String[] fromColumns = new String[]{
                  hvkContentProvider.KEY_TYPE,
                  hvkContentProvider.KEY_CLTYP,
                  hvkContentProvider.KEY_NAME,
                  hvkContentProvider.KEY_VNAME    
          };
          Log.i(TAG, &quot;Before toViews&quot;);
          int[] toViews = new int[]{
              R.id.contactType,
              R.id.contactCltype,
              R.id.contactName,
              R.id.contactVname
          };
          Log.i(TAG, &quot;Before Adapter&quot;);
          hdwDataAdapter = new SimpleCursorAdapter(getActivity(), R.layout.object_list_item, resultCursor, fromColumns, toViews, 0);
          listview = (ListView) rootView.findViewById(R.id.list_all);
          listview.setAdapter(hdwDataAdapter);
          Log.i(TAG, &quot;Before return Layout&quot;);
          return (LinearLayout) rootView;
      }
      
      @Override
      public void onActivityCreated(Bundle savedInstanceState){
          super.onActivityCreated(savedInstanceState);
          
          //Bundle args = null;
          //loaderManager.initLoader(LOADER_ID, args, loaderCallback);
      }
  }
  </code></pre>
  <p>The Method: insertSomeFunctions() i have left out since it doesn't make a difference here, gonna put a bounty on this asap. Really need to get this done.</p>