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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:11:17+00:00 2026-06-15T11:11:17+00:00

I’m farily new to Android. I followed a tutorial to create a login screen

  • 0

I’m farily new to Android. I followed a tutorial to create a login screen using PHP and MySQL…it worked a couple of days ago..now when I try to run the app it is giving me a force close error and a Java.lang.NullPointerException…I’m guessing that means something is null that isn’t supposed to be? Could someone PLEASE help me out?

This is my LogCat:

12-03 11:48:06.089: D/AndroidRuntime(13538): Shutting down VM
12-03 11:48:06.099: W/dalvikvm(13538): threadid=1: thread exiting with uncaught exception (group=0x2aac8560)
12-03 11:48:06.099: E/AndroidRuntime(13538): FATAL EXCEPTION: main
12-03 11:48:06.099: E/AndroidRuntime(13538): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.groupone.the.health.effect/com.groupone.the.health.effect.AndroidDashboardDesignActivity}: java.lang.NullPointerException
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.app.ActivityThread.access$1500(ActivityThread.java:121)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.os.Looper.loop(Looper.java:123)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.app.ActivityThread.main(ActivityThread.java:3701)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at java.lang.reflect.Method.invokeNative(Native Method)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at java.lang.reflect.Method.invoke(Method.java:507)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at dalvik.system.NativeStart.main(Native Method)
12-03 11:48:06.099: E/AndroidRuntime(13538): Caused by: java.lang.NullPointerException
12-03 11:48:06.099: E/AndroidRuntime(13538):    at com.groupone.the.health.effect.AndroidDashboardDesignActivity.onCreate(AndroidDashboardDesignActivity.java:92)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-03 11:48:06.099: E/AndroidRuntime(13538):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
12-03 11:48:06.099: E/AndroidRuntime(13538):    ... 11 more

Here is my .AndroidDashboardDesignActivity:

package com.groupone.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class AndroidDashboardDesignActivity extends Activity {

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

        /**
         * Creating all buttons instances
         * */
        // Dash board News feed button
        Button btn_newsfeed = (Button) findViewById(R.id.btn_news_feed);

        // Dash board Friends button
        Button btn_friends = (Button) findViewById(R.id.btn_friends);

        // Dash board Messages button
        Button btn_messages = (Button) findViewById(R.id.btn_messages);

        // Dash board Places button
        Button btn_places = (Button) findViewById(R.id.btn_places);

        // Dash board Events button
        Button btn_events = (Button) findViewById(R.id.btn_events);

        // Dash board Photos button
        Button btn_photos = (Button) findViewById(R.id.btn_photos);

        /**
         * Handling all button click events
         * */

        // Listening to News Feed button click
        btn_newsfeed.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                // Launching News Feed Screen
                Intent i = new Intent(getApplicationContext(), NewsFeedActivity.class);
                startActivity(i);
            }
        });

       // Listening Friends button click
        btn_friends.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                // Launching News Feed Screen
                Intent i = new Intent(getApplicationContext(), AndroidFacebookConnectActivity.class);
                startActivity(i);
            }
        });

        // Listening Messages button click
        btn_messages.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                // Launching News Feed Screen
                Intent i = new Intent(getApplicationContext(), MessagesActivity.class);
                startActivity(i);
            }
        });

        // Listening to Places button click
        btn_places.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                // Launching News Feed Screen
                Intent i = new Intent(getApplicationContext(), MessagesActivity.class);
                startActivity(i);
            }
        });

        // Listening to Events button click
        btn_events.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                // Launching News Feed Screen
                Intent i = new Intent(getApplicationContext(), MessagesActivity.class);
                startActivity(i);
            }
        });

        // Listening to Photos button click
        btn_photos.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                // Launching News Feed Screen
                Intent i = new Intent(getApplicationContext(), PhotosActivity.class);
                startActivity(i);
            }
        });
    }
}

Here is my Layout:

!-- Your package folder -->
<com.groupone.the.health.effect.DashboardLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:background="#3b3b3b" >
    <!--  News Feed Button -->
    <Button
        android:id="@+id/btn_news_feed"
        style="@style/DashboardButton"
        android:drawableTop="@drawable/healthbook"
        android:text="Activities" />

    <Button
        android:id="@+id/btn_messages"
        style="@style/DashboardButton"
        android:drawableTop="@drawable/mental"
        android:text="Mental Input" />

    <!--  Events Button -->
    <Button
        android:id="@+id/btn_events"
        style="@style/DashboardButton"
        android:drawableTop="@drawable/graph"
        android:text="Results" />

    <!--  Photos Button -->


    <!--  Friends Button -->
    <Button
        android:id="@+id/btn_friends"
        style="@style/DashboardButton"
        android:drawableTop="@drawable/btn_facebook"
        android:text="Facebook" />

    <!--  Messages Button -->


    <!--  Places Button -->
    <Button
        android:id="@+id/btn_places"
        style="@style/DashboardButton"
        android:drawableTop="@drawable/twitter_logo"
        android:text="Health Tweets" />



    <Button 
        android:id="@+id/btnLogout"
        style="@style/DashboardButton"
        android:drawableTop="@drawable/logout"
        android:text="Log Out"/>



</com.groupone.the.health.effect.DashboardLayout>
  • 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-15T11:11:19+00:00Added an answer on June 15, 2026 at 11:11 am
    Button btn_photos = (Button) findViewById(R.id.btn_photos);
    

    this line causing problem because R.id.btn_photos button id not exist in current layout xml . so make sure you are using right layout in Activity setContentView(R.layout.dashboard_layout);

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.