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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:57:14+00:00 2026-06-01T22:57:14+00:00

Slowly but surely I hat to update the android SDK… Today I update the

  • 0

Slowly but surely I hat to update the android SDK…

Today I update the SDK to revision 18 and my project (before the update perfectly working) throws a NullPointer Exception even I just start it up from eclipse. I’m using eclipse with the android ADT and also update this part after update the SDK. I also tried “Fix Project Properties” with no result.

In the meanwhile my project is quit big so for the start I just post the LogCat messages, if someone need more just say it, I will post it. But I’m really disappointed that every time I update the SDK my project throws some new, mysterious errors (run into the external lib problem with revision 17…).

Hope someone can help me out! I don’t think it’s a problem with the code anyway. Its something they changed somewhere I don’t know :/

[Update]

I get some extra time to debug the code. The problem occurs in the construtor. It look like this (suprise, suprise):

@Override
public void onCreate(Bundle _savedInstanceState) 
{   /// Einstiegspunkt der Android App
    super.onCreate(_savedInstanceState);       
    setContentView(R.layout.login);
    LoadSharedPreferences();
}

The exception throws after the activity tries to go to the LoadSharedPrefrerences method…

[Update: Code around line 49]

...
SharedPreferences data = getSharedPreferences(_saveUserDataRef, MODE_PRIVATE);
String tmpUsername = data.getString("username", null);
String tmpPassword = data.getString("password", null);
username.setText(tmpUsername);
password.setText(tmpPassword);
...

This snippet save the username and password if you want the app to remeber these data for you. So you dont need to write it everytime you log on.

LogCat:

04-12 12:09:47.615: D/dalvikvm(1094): GC_EXTERNAL_ALLOC freed 47K, 48% free 2835K/5379K, external 0K/0K, paused 78ms
04-12 12:09:47.686: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@401462d0,-1,0,-1,0)
04-12 12:09:47.686: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4011b730,-1,0,-1,0)
04-12 12:09:47.696: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@401462d0,-1,0,-1,0)
04-12 12:09:47.696: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4011b730,-1,0,-1,0)
04-12 12:09:47.696: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@401462d0,-1,0,-1,0)
04-12 12:09:47.696: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4011b730,-1,0,-1,0)
04-12 12:09:47.696: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@401462d0,-1,0,-1,0)
04-12 12:09:47.696: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4011b730,-1,0,-1,0)
04-12 12:09:47.716: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@401462d0,-1,0,-1,0)
04-12 12:09:47.716: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4011b730,-1,0,-1,0)
04-12 12:09:47.716: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@401462d0,-1,0,-1,0)
04-12 12:09:47.716: I/[POST_RESELECT](1094): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4011b730,-1,0,-1,0)
04-12 12:09:47.716: D/AndroidRuntime(1094): Shutting down VM
04-12 12:09:47.716: W/dalvikvm(1094): threadid=1: thread exiting with uncaught exception (group=0x400205a0)
04-12 12:09:47.726: E/AndroidRuntime(1094): FATAL EXCEPTION: main
04-12 12:09:47.726: E/AndroidRuntime(1094): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.tzm.seanwesenheitsliste/de.tzm.seanwesenheitsliste.SEAnwesenheitslisteMainActivity}: java.lang.NullPointerException
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1830)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.app.ActivityThread.access$1500(ActivityThread.java:132)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.os.Looper.loop(Looper.java:150)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.app.ActivityThread.main(ActivityThread.java:4277)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at java.lang.reflect.Method.invokeNative(Native Method)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at java.lang.reflect.Method.invoke(Method.java:507)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at dalvik.system.NativeStart.main(Native Method)
04-12 12:09:47.726: E/AndroidRuntime(1094): Caused by: java.lang.NullPointerException
04-12 12:09:47.726: E/AndroidRuntime(1094):     at de.tzm.seanwesenheitsliste.SEAnwesenheitslisteMainActivity.LoadSharedPreferences(SEAnwesenheitslisteMainActivity.java:49)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at de.tzm.seanwesenheitsliste.SEAnwesenheitslisteMainActivity.onCreate(SEAnwesenheitslisteMainActivity.java:32)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
04-12 12:09:47.726: E/AndroidRuntime(1094):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1794)
04-12 12:09:47.726: E/AndroidRuntime(1094):     ... 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-01T22:57:16+00:00Added an answer on June 1, 2026 at 10:57 pm

    I can’t tell from your post which line is line 49, but my guess is:

    either: data is null after getSharedPreferences(_saveUserDataRef, MODE_PRIVATE);

    or: one of tmpUsername or tmpPassword is null after trying to get them from data.

    Can you try find out if that’s the case? If so, you’ll know where to look next to solve the problem.

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

Sidebar

Related Questions

So I'm still trying to get comfortable using Parsec, but I'm slowly working it
I've been slowly working on a personnel project to run a webmud like game
I'm slowly but surely putting together my first rails app (first web-app of any
I run a site that is slowly but surely draining all of the available
Slowly but surely I think I'm going mad. After getting the solution to my
I have been learning (slowly but surely) how to do deal with sqlite databases
I'm currently moving slowly but steady forward in the making of a Android application
Slowly, but surely, I'm assembling a website for personal usage where I search for
So, I'm slowly working in some Python 3.0, but I still have a lot
I mean I want to drawline but slowly. I write this code to draw

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.