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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:27:39+00:00 2026-05-22T23:27:39+00:00

In order to get my feet wet with Android development, I thought I’d hire

  • 0

In order to get my feet wet with Android development, I thought I’d hire a guy to lay the foundation of a simple app for me, then I would try and take it from there. So far it’s worked really well. I’ve been able to learn quite a bit.

One of the issues I am having though is that I keep getting crash reports about an bug that is causing the app to crash, but the app works perfectly for me on my Nexus S! I am used to iOS development where everything is uniform…

A number of reports are coming in with the following error:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.elan.readerJapanese/com.elan.readerJapanese.Language}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
at android.app.ActivityThread.access$2300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
 at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.NullPointerException
 at com.elan.readerJapanese.Language.onCreate(Language.java:91)
 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
 ... 11 more'

Which is pretty hard for me to understand. I understand that there is a null pointer exception being thrown in my language class’s onCreate method, but I can’t get it to reproduce! So I have no idea what may be going on. Here is the code for my onCreate method. `public void onCreate(Bundle savedInstanceState) {

   super.onCreate(savedInstanceState);
   setContentView(R.layout.title_list_menu);
   me=this;

   Bundle extras = getIntent().getExtras();
   DatabaseHelper myDatabaseAdapter;
    myDatabaseAdapter = DatabaseHelper.getInstance(me);
   if(extras !=null)
   {


    if(!myDatabaseAdapter.databaseReady()){
        try{
            myDatabaseAdapter.copyDatabase2();
            DatabaseHelper_Spa myDatabaseAdapter_spa = DatabaseHelper_Spa.getInstance(me);
            myDatabaseAdapter_spa.copyDatabaseSpanish2();

        }catch(Exception e){
            e.printStackTrace();
        }
        myDatabaseAdapter.databaseReady();
    }
   }else{
        //myDatabaseAdapter.close();
       if(!myDatabaseAdapter.databaseReady()){
            try{
                myDatabaseAdapter.copyDatabase2();
                DatabaseHelper_Spa myDatabaseAdapter_spa = DatabaseHelper_Spa.getInstance(me);
                myDatabaseAdapter_spa.copyDatabaseSpanish2();

            }catch(Exception e){
                e.printStackTrace();
            }
            myDatabaseAdapter.databaseReady();
        }
       else if(myDatabaseAdapter.getSaveVerse()[0]!=null||!myDatabaseAdapter.getSaveVerse()[0].equals("")){
            String data[]=myDatabaseAdapter.getSaveVerse();
           Intent intent=new Intent(Language.this,  Verse.class);
        intent.putExtra("language",data[0]);
        intent.putExtra("volume_id",data[1]);
        intent.putExtra("chapter",data[2]);
        intent.putExtra("book",data[3]);
        intent.putExtra("book_id",data[4]);
        intent.putExtra("multiple_languages",false);
            startActivity(intent);

        }
    }


  // listImage=new Bitmap[]{BitmapFactory.decodeResource(getResources(), R.drawable.sharing),BitmapFactory.decodeResource(getResources(), R.drawable.contact_us),BitmapFactory.decodeResource(getResources(), R.drawable.about)};
   m_orders = new ArrayList<SettingsObject>();
   this.m_adapter = new AboutAdapter(this, R.layout.language_row, m_orders);
   setListAdapter(this.m_adapter);
   viewOrders = new Runnable(){
       @Override
       public void run() {
           getOrders();
       }
   };

   Thread thread =  new Thread(null, viewOrders, "MagentoBackground");
   thread.start();

}`

It would be great if someone could tell me if they see something out of line in the above code, or if not,m what I can do to try and debug this error. Like I said, I am having trouble with it because the error won’t reproduce on my device, so it’s hard to see what people are getting.

Thanks!

  • 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-22T23:27:40+00:00Added an answer on May 22, 2026 at 11:27 pm

    If you look at the stack trace you see that the exception occured at line 91 in Language.java.

    You can tell this from the last part of the exception output:

    Caused by: java.lang.NullPointerException
    at com.elan.readerJapanese.Language.onCreate(Language.java:91)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
    ... 11 more'
    

    Without knowing the line I would guess it has something to do with the database stuff.
    Could the method getSaveVerse ever return null?


    I’m guessing your line number have changed since that stack trace because if line 91 is the one that you say the only that could cause that stack trace is if myDatabaseAdapter is null but that would make the line before (else if(myDatabaseAdapter.getSaveVerse()[0]!=null||!myDatabaseAdapter.getSaveVerse()[0].equals("")){) to crash.

    I don’t see how it’s possible for that stack trace to occur unless you have some other object modifying myDatabaseAdapter

    That said make sure that your DatabaseHelper doesn’t modify your Activity

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

Sidebar

Related Questions

I'm writing a small test project in order to get my feet wet with
I'm working a very simple forum software to help get my feet wet with
I'm trying to get my feet wet with GWT to see if migrating will
In order to get my setup a bit closer to one click deployment, I
In order to get better SEO and cleaner URLs, I tend to export certain
In order to get the next element in the list one just needs to
I'm attempting to get order data from a Yahoo store. I'm using the docs
What exactly needs to happen in order to get detailed SQL logs out of
I am using saxparser in order to get xml tag contents from file. All
How to fix this regex in order to get the mentioned outcome ? regex:

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.