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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:08:42+00:00 2026-05-20T10:08:42+00:00

I have done this many times in different apps but this is my first

  • 0

I have done this many times in different apps but this is my first time on a honeycomb app and for some reason it is not working…

I call

Intent myIntent = new Intent(getApplicationContext(), PvP.class); 

    startActivity(myIntent);

When a button is pushed. Here is my manifest:

 <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.aaron.decker.make15"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="11" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".MainMenu"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="PvP" android:label="PvP" android:theme="@android:style/Theme.NoTitleBar"> </activity>

    </application>
</manifest>

Also, if needed here is the other class (Just the onCreate):

    package com.aaron.decker.make15;

    import android.app.Activity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.TextView;

    public class PvP extends Activity{
        private int PLAYER_ONE_SCORE;
        private int PLATER_TWO_SCORE;
        private boolean turn;
        //Button button = (Button) findViewById(R.id.button_id);
        TextView p1 = (TextView) findViewById(R.id.p1);
        TextView p2 = (TextView) findViewById(R.id.p2);

    //If turn is false then it is player one's turn, else if it is true it is player two's turn. FALSE = P1 TRUE = P2

          public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.game);
                turn = false;


            }
}

EDIT: FORGOT LOGCAT! Sorry! Here:

03-06 16:08:13.382: ERROR/AndroidRuntime(652): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.aaron.decker.make15/com.aaron.decker.make15.PvP}: java.lang.NullPointerException
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1660)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1752)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.app.ActivityThread.access$1500(ActivityThread.java:123)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.os.Looper.loop(Looper.java:126)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.app.ActivityThread.main(ActivityThread.java:3997)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at java.lang.reflect.Method.invokeNative(Native Method)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at java.lang.reflect.Method.invoke(Method.java:491)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at dalvik.system.NativeStart.main(Native Method)
03-06 16:08:13.382: ERROR/AndroidRuntime(652): Caused by: java.lang.NullPointerException
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.app.Activity.findViewById(Activity.java:1741)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at com.aaron.decker.make15.PvP.<init>(PvP.java:13)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at java.lang.Class.newInstanceImpl(Native Method)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at java.lang.Class.newInstance(Class.java:1424)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.app.Instrumentation.newActivity(Instrumentation.java:1022)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
03-06 16:08:13.382: ERROR/AndroidRuntime(652):     ... 11 more

Any ideas? maybe its something stupid, I don’t know. Cant seem to figure it out.

  • 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-20T10:08:42+00:00Added an answer on May 20, 2026 at 10:08 am
    TextView p1 = (TextView) findViewById(R.id.p1);
    TextView p2 = (TextView) findViewById(R.id.p2);
    

    Those must be called in onCreate(), after the layout has been set.

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

Sidebar

Related Questions

It's the first time I have done anything like this but wondered what the
I think this has been done many times before but despite reading some posts
I have done this before but I forgot where in my app I have
i have done some code in jquery but where i commented in this bellow
I have asked this question so many times and have tried so many different
I have a somewhat unusual issue. I've done something like this many times: $('#selector').css('color','#00f');
I have done this operation millions of times, just using the + operator! I
I have done this without much effort on T-SQL, but I want to implement
I have done some looking and I found this: http://www.codeproject.com/Articles/14439/The-ScrollableListBox-Custom-Control-for-ASP-NET-2 but to me it
I know this question has been asked many times, but my problem is a

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.