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 6385429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:53:55+00:00 2026-05-25T02:53:55+00:00

I tried to include android.jar into Java project, remove JRE from Build Path and

  • 0

I tried to include android.jar into Java project, remove JRE from Build Path and run this code. It throws Runtime exception. Why?

Exception in thread "main" java.lang.RuntimeException: Stub!
    at android.content.ContentValues.<init>(ContentValues.java:5)
    at JarTest.main(JarTest.java:5)

public class JarTest {
    public static void main(final String[] args) {
        final ContentValues values = new ContentValues();
        values.put("test", "test");
        System.out.println(values);
    }
}

Why is ContentValues used only in Android environment?

  • 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-25T02:53:55+00:00Added an answer on May 25, 2026 at 2:53 am

    The android.jar in the SDK only contains stub implementations of the SDK classes, not the real implementations that are found on the devices (or emulator). The jar just provides the class metadata so that your apps that reference the SDK classes will build properly.

    You can’t create any project that references the android.jar that will run outside an Android device.

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

Sidebar

Related Questions

i'm trying to include a maven java project into my android project. the maven
I tried without any result. My code looks like this: #include stdafx.h #include <iostream>
I'm a beginner in android and i tried running some code I got from
I tried to compile this example: #include <stdio.h> #include <stdlib.h> #include <stddef.h> main(){ size_t
How do you pass a parameter into an include file? I tried the following
<ImageButton android:id=@+id/previous android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/media_skip_backward android:background=@drawable/transparent></ImageButton> This is what I tried to get a
I tried to include the code below in a newsletter using a service called
I have an Android Eclipse project that I'd like to divide into two sub-projects.
File formats I would like to play include .wav, .mp3, .midi. I have tried
I just don't get it. Tried on VC++ 2008 and G++ 4.3.2 #include <map>

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.