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

  • SEARCH
  • Home
  • 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 1016107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:30:01+00:00 2026-05-16T10:30:01+00:00

I get this error everytime I try to use my content provider to insert

  • 0

I get this error everytime I try to use my content provider to insert a URI. Here is the method:

private void sample() {
    ContentValues values;

    values = new ContentValues();
    values.put(Formulas.TITLE, "Formula1");
    values.put(Formulas.FORMULA, "someformula");
    getContentResolver().insert(getIntent().getData(), values);

    values = new ContentValues();
    values.put(Formulas.TITLE, "Formula2");
    values.put(Formulas.FORMULA, "someformula");
    getContentResolver().insert(getIntent().getData(), values);

    values = new ContentValues();
    values.put(Formulas.TITLE, "Formula3");
    values.put(Formulas.FORMULA, "someformula");
    getContentResolver().insert(getIntent().getData(), values);
}

Previously I set the Intent data here:

Intent intent = getIntent();
if (intent.getData() == null)
    intent.setData(Formulas.CONTENT_URI);

Here is my content URI and authority:

public static final String AUTHORITY = "com.mohit.provider.FormulaProvider";
public static final Uri CONTENT_URI = Uri.parse("content:\\" + AUTHORITY + "\formulas");

Here is the provider tag:

<provider android:name="com.mohit.provider.FormulaProvider" 
        android:authorities="com.mohit.provider.FormulaProvider" />

And finally the Logcat log:

08-22 14:42:07.362: ERROR/AndroidRuntime(338): FATAL EXCEPTION: main
08-22 14:42:07.362: ERROR/AndroidRuntime(338): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mohit.gformula.activities/com.mohit.gformula.activities.FormulasList}: java.lang.IllegalArgumentException: Unknown URL content:\\com.mohit.provider.FormulaProvider\formulas
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.os.Looper.loop(Looper.java:123)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.app.ActivityThread.main(ActivityThread.java:4627)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at java.lang.reflect.Method.invokeNative(Native Method)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at java.lang.reflect.Method.invoke(Method.java:521)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at dalvik.system.NativeStart.main(Native Method)
08-22 14:42:07.362: ERROR/AndroidRuntime(338): Caused by: java.lang.IllegalArgumentException: Unknown URL content:\\com.mohit.provider.FormulaProvider\formulas
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.content.ContentResolver.insert(ContentResolver.java:583)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at com.mohit.gformula.activities.FormulasList.sample(FormulasList.java:38)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at com.mohit.gformula.activities.FormulasList.onCreate(FormulasList.java:23)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-22 14:42:07.362: ERROR/AndroidRuntime(338):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)

What could be the problem?

  • 1 1 Answer
  • 1 View
  • 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-16T10:30:02+00:00Added an answer on May 16, 2026 at 10:30 am

    backslashes \ look strange in a URI, try // resp. /

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

Sidebar

Related Questions

I get this error when I try to use time_ago_in_words : Comparison of String
Every time I try to use Export, I get this Error: General::unavail: Export is
I get this 'error' when running PEVerify on a custom generated assembly. [MD](0x8013124C): Error:
I get this error when trying ruby script/console Rails requires RubyGems >= . Please
I get this error message in Eclipse: Access restriction: The type DirectoryWalker is not
I get this error when I run a django app ( dpaste ) Template
I get this error when trying to link a win32 exe project. I have
I get this error when launching my Mongrel server... $ script/server --debugger => Booting
I get this error when compiling a C# application. Looks like a trivial error,
I get this error when trying to load a Zend Framework application: Fatal error:

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.