Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7046459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:39:11+00:00 2026-05-28T02:39:11+00:00

So I created a simple content provider, but I’ve got an error : Failed

  • 0

So I created a simple content provider, but I’ve got an error :

Failed to find provider info for com.b1.BooksContentProvider

I have 2 AVD names for 2.2 and 3.2 versions (I wrote random names for both of them)
3.2 because I use the v4 Fragment support
So, I don’t know if the problem comes from the manifest, or from the version I’m using to launch the emulator.

here’s my manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.b1"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".MyBooksActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="vnd.android.cursor.item/mt_books" />
                <data android:mimeType="vnd.android.cursor.dir/mt_books" />
            </intent-filter>
        </activity>
        <provider
            android:authorities="com.b1.BooksContentProvider"
            android:name="com.b1.BooksContentProvider"></provider>

    </application>

</manifest>

and the first part of my content provider :

public class BooksContentProvider extends ContentProvider {

    BooksDataBase mDB;
    private static final String AUTHORITY = "com.b1.MyBooksActivity";
    private static final String BASE_PATH = "books";
    public static final Uri CONTENT_URI = Uri.parse("content:// " + AUTHORITY + "/" + BASE_PATH);
    public static final String CONTENT_ITEM_TYPE = ContentResolver.CURSOR_ITEM_BASE_TYPE
        + "/mt_books";
    public static final String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE
        + "/mt_books";

    private static final UriMatcher sURIMatcher = new UriMatcher(UriMatcher.NO_MATCH);
    private static final int BOOK_DIR = 101;
    private static final int BOOK_ITEM = 102;

    static
    {
        sURIMatcher.addURI(AUTHORITY, BASE_PATH, BOOK_DIR);
        sURIMatcher.addURI(AUTHORITY, BASE_PATH+"/#", BOOK_ITEM);
    }

Thanks for your help


UPDATE


Ok, one of the possible mistake was :
i forgot to “import” the different classes
also, in the fragment XML : the LinearLayout did not work, i had to put a “TextView” alone in the XML

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:39:12+00:00Added an answer on May 28, 2026 at 2:39 am
    private static final String AUTHORITY = "com.b1.MyBooksActivity";
    

    That is not the same authority as you have in your <provider> element:

    <provider
            android:authorities="com.b1.BooksContentProvider"
            android:name="com.b1.BooksContentProvider"></provider>
    

    They need to match.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone help me on this, I have created simple web services using axis2
How to manually create Friendly URLs? (PHP) So I have created simple php file
I created a simple test page on my website www.xaisoft.com and it had no
This is a simple question but I couldn't find an answer for it online.
I created a simple .NET windows application in Visual Studio 2005 and on just
I created a simple dialog-based application, and in the default CDialog added three buttons
I created a simple detail edit form earlier, and decided to data bind some
I created a simple PHP site for a friend last year. I went to
I created a simple Converter to concatenate the text of four TextBoxes in my
I created a simple Oracle type: create or replace TYPE MY_TYPE AS OBJECT (ID

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.