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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:51:58+00:00 2026-06-06T17:51:58+00:00

Here is the relevent code: … Resources res; @Override public void onCreate(Bundle savedInstanceState) {

  • 0

Here is the relevent code:

...
Resources res;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.variable);

    res = getResources();
    ...
}

protected void setup() {
    String text = res.getStringArray(R.array.categories)[4];
}

What could be causing this? Logcat:

07-01 13:37:01.988: E/AndroidRuntime(13905): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.centauri.equations/com.centauri.equations.activity.physics.WorkActivity}: java.lang.NullPointerException
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.app.ActivityThread.access$600(ActivityThread.java:123)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.os.Looper.loop(Looper.java:137)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.app.ActivityThread.main(ActivityThread.java:4424)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at java.lang.reflect.Method.invokeNative(Native Method)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at java.lang.reflect.Method.invoke(Method.java:511)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at dalvik.system.NativeStart.main(Native Method)
07-01 13:37:01.988: E/AndroidRuntime(13905): Caused by: java.lang.NullPointerException
07-01 13:37:01.988: E/AndroidRuntime(13905):    at com.centauri.equations.activity.physics.WorkActivity.setup(WorkActivity.java:119)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at com.centauri.equations.activity.Categories.onCreate(Categories.java:95)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at com.centauri.equations.activity.physics.WorkActivity.onCreate(WorkActivity.java:34)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.app.Activity.performCreate(Activity.java:4465)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-01 13:37:01.988: E/AndroidRuntime(13905):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
07-01 13:37:01.988: E/AndroidRuntime(13905):    ... 11 more
  • 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-06-06T17:52:00+00:00Added an answer on June 6, 2026 at 5:52 pm

    it seems that res is null for some reason

    From what you have posted I’ll wager the you are calling setup() for you initialize res… Change your code around to this:

    res = getResources();
    setup();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here is the relevent code snippet: public static Rand searchCount (int[] x) { int
Here's the relevant code: public static void printBoarders (Territory x) { int t =
Here is the relevant code: @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) {
Here's the relevant code snippet. public static Territory[] assignTerri (Territory[] board, String[] colors) {
Here's the relevant code: public static String[] runTeams (String CPUcolor) { boolean z =
Here's the relevant code: app.get('/all', function(req,res) { Party.find({},[],function(p) { console.log(p); }); res.redirect('/'); }); should
Here's the relevant code: <div data-bind=foreach: chats, visible: chats().length > 0> <input data-bind='value: $parent.newCommentText'
Superfish JS is here . Here's the relevant code: $.fn.extend({ hideSuperfishUl : function() {
I'm having some trouble with the jQuery hover method. Here's the relevant JavaScript code:
Here is the code relevant to my question: http://jsfiddle.net/mkerny45/V23NK/ As you can see there

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.