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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T08:50:57+00:00 2026-05-21T08:50:57+00:00

I am trying to make an android game in eclipse (in windows). I keep

  • 0

I am trying to make an android game in eclipse (in windows). I keep getting nulpointerexceptions, and classcastexceptions when i run my program both on the emulator and on my phone. I have 2 classes(activities), each with their own xml layout. the main activity runs perfectly. However when I launch the second activity with:

final Intent i = new Intent(this, Arrowscreen.class);
... 
startActivity(i);

I get the previously mentioned exceptions. It always points to the source, which is not found. Is there anyway to step through the source in eclipse in windows? I have looked at http://source.android.com, but there seems to be no solution for windows. I tried to follow the linux instructions from cygwin, but it doesn’t seem to work(and i’d prefer to work in windows if possible).

I am still new to android development, so i may be missing something important. Is there anything wrong with this manifest declaration?:

<activity android:name=".Arrowscreen" 
                android:screenOrientation="landscape"
                android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
                android:label="@string/app_name">
        <intent-filter>
                <action android:name="android.intent.action.RUN" />
                <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>

I will refrain from posting my whole code sample because it is lengthy, but i will tell you that it uses the accelerometer, gps, and a runnable for the main loop on a timer with “postDelayed”. the gps fine location permission is in the manifest also. I am stuck, so any help would be much appreciated. Thanks!

edit: the following is the part of my code where i get the runtime exception

@Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);

        setContentView(R.layout.arrow);

        img=(ImageView)findViewById(R.id.ArrowBackground);
        arrow1=(ImageView)findViewById(R.id.turningArrow);
        GPSx=(TextView)findViewById(R.id.textView1);
        GPSy=(TextView)findViewById(R.id.textView2);
        MGNTx=(TextView)findViewById(R.id.textView3);
        MGNTy=(TextView)findViewById(R.id.textView4);
        angle = 0;
        lastAngle = 0;
        arrowAngle = 0;
        mValues[0]=0; mValues[1]=0; mValues[2]=0; 

        //mStartTime = System.currentTimeMillis();
        mHandler.removeCallbacks(UpdateArrow);
        mHandler.postDelayed(UpdateArrow, 400);
  • 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-21T08:50:58+00:00Added an answer on May 21, 2026 at 8:50 am

    Unless I’ve misunderstood your question…

    In Eclipse, set a breakpoint at the first line of onCreate in your Activity, and launch the app in debug mode (Run -> Degub As -> Android Application).

    Two Blog posts on doing this:
    1. http://www.droidnova.com/debugging-in-android-using-eclipse,541.html
    2. http://www.latenightpc.com/blog/archives/2007/11/21/starting-a-debug-session-for-android-with-adt

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

Sidebar

Related Questions

I'm, trying to make a simple 3D game for Android, and I want to
Trying to make an google maps overlay in an android program. Inside of my
I'm trying to make my first android game and to do this I made
I am trying to make my Android application run some code when run from
I'm trying to make an easy side scrolling game just to learn the ropes
The reason: I'm trying to make Android work in a device without touch screen.
im trying to make an android application that whenever a user conncects to a
I'm trying to make a notification in Android. But i get the error in
I am trying to make APP native code for Android. The Native code is
I am trying to make an app that opens android market page of selected

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.