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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:20:29+00:00 2026-06-13T05:20:29+00:00

I’m trying to paint a ball on the screen, but it force closes. Something

  • 0

I’m trying to paint a ball on the screen, but it force closes. Something is going wrong.

Ball b = new Ball();

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ingame);
    start();
}

private void start() {
    Ball b = new Ball();
}

public void paint(Graphics g) {
    b.paint(g);
    g.setColor(Color.GREEN);
    g.fillOval(x-radius, y-radius, radius*2, radius*2);
}

Here’s my LogCat:

10-15 21:02:45.492: E/dalvikvm(7847): Could not find class ‘com.game.src.Ball’, referenced from method com.jordan.bungee.bounce.Cracka.
10-15 21:02:45.492: W/dalvikvm(7847): VFY: unable to resolve new-instance 417 (Lcom/game/src/Ball;) in Lcom/jordan/bungee/bounce/Cracka;
10-15 21:02:45.492: D/dalvikvm(7847): VFY: replacing opcode 0x22 at 0x002b
10-15 21:02:45.492: D/dalvikvm(7847): VFY: dead code 0x002d-0032 in Lcom/jordan/bungee/bounce/Cracka;. ()V
10-15 21:02:45.496: E/dalvikvm(7847): Could not find class ‘com.game.src.Ball’, referenced from method com.jordan.bungee.bounce.Cracka.start
10-15 21:02:45.496: W/dalvikvm(7847): VFY: unable to resolve new-instance 417 (Lcom/game/src/Ball;) in Lcom/jordan/bungee/bounce/Cracka;

10-15 21:02:45.496: D/dalvikvm(7847): VFY: replacing opcode 0x22 at 0x0000

10-15 21:02:45.500: D/dalvikvm(7847): VFY: dead code 0x0002-0005 in Lcom/jordan/bungee/bounce/Cracka;.start ()V

10-15 21:02:45.500: W/dalvikvm(7847): VFY: unable to find class referenced in signature (Ljava/awt/Graphics;)

10-15 21:02:45.503: I/dalvikvm(7847): Could not find method com.game.src.Ball.paint, referenced from method com.jordan.bungee.bounce.Cracka.paint

10-15 21:02:45.503: W/dalvikvm(7847): VFY: unable to resolve virtual method 3021: Lcom/game/src/Ball;.paint (Ljava/awt/Graphics;)V

10-15 21:02:45.503: D/dalvikvm(7847): VFY: replacing opcode 0x6e at 0x0002

10-15 21:02:45.503: D/dalvikvm(7847): VFY: dead code 0x0005-001f in Lcom/jordan/bungee/bounce/Cracka;.paint (Ljava/awt/Graphics;)V

10-15 21:02:45.507: D/AndroidRuntime(7847): Shutting down VM

10-15 21:02:45.507: W/dalvikvm(7847): threadid=1: thread exiting with uncaught exception (group=0x4001e578)
10-15 21:02:45.527: E/AndroidRuntime(7847): FATAL EXCEPTION: main

10-15 21:02:45.527: E/AndroidRuntime(7847): java.lang.NoClassDefFoundError: com.game.src.Ball

10-15 21:02:45.527: E/AndroidRuntime(7847): at com.jordan.bungee.bounce.Cracka.(Cracka.java:22)

10-15 21:02:45.527: E/AndroidRuntime(7847): at java.lang.Class.newInstanceImpl(Native Method)

10-15 21:02:45.527: E/AndroidRuntime(7847): at java.lang.Class.newInstance(Class.java:1409)

10-15 21:02:45.527: E/AndroidRuntime(7847): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)

10-15 21:02:45.527: E/AndroidRuntime(7847): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)

10-15 21:02:45.527: E/AndroidRuntime(7847): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)

10-15 21:02:45.527: E/AndroidRuntime(7847): at android.app.ActivityThread.access$1500(ActivityThread.java:117)

10-15 21:02:45.527: E/AndroidRuntime(7847): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)

10-15 21:02:45.527: E/AndroidRuntime(7847): at android.os.Handler.dispatchMessage(Handler.java:99)

10-15 21:02:45.527: E/AndroidRuntime(7847): at android.os.Looper.loop(Looper.java:130)

10-15 21:02:45.527: E/AndroidRuntime(7847): at android.app.ActivityThread.main(ActivityThread.java:3687)

10-15 21:02:45.527: E/AndroidRuntime(7847): at java.lang.reflect.Method.invokeNative(Native Method)

10-15 21:02:45.527: E/AndroidRuntime(7847): at java.lang.reflect.Method.invoke(Method.java:507)

10-15 21:02:45.527: E/AndroidRuntime(7847): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)

10-15 21:02:45.527: E/AndroidRuntime(7847): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)

10-15 21:02:45.527: E/AndroidRuntime(7847): at dalvik.system.NativeStart.main(Native Method)

  • 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-13T05:20:32+00:00Added an answer on June 13, 2026 at 5:20 am

    I’m not sure why you’re defining a local variable b in your start() method since you’ve already defined one as a class member. The one you created in start() will be lost as soon as start() returns.

    Also: the member object you create will be instantiated long before onCreate() is called. Is there enough context available when the Activity is created for Ball() to be created successfully? Without seeing the source code to Ball() we can’t tell.

    Your logcat output indicates that the class for Ball was not found. Did you write it? Did you put it in the right directory where Eclipse could find it?

    This question and your follow-ups seem to indicate that you’re extremely new to Android programming, and possibly new to Java. If you’re new to Java, I would think good and hard about trying to learn Android so soon. Android is not a programming environment for beginners.

    That said, I suggest you start out by doing some of the tutorials to familiarize yourself with the system. Then, to write your own application, find a tutorial that most closely resembled what you’re trying to do, copy it, and start making modifications. I almost always start new projects by copying old projects. This way, you know that filesystem layout and so forth is probably correct to begin it.

    Finally, at the bottom of your Eclipse window, you’ll see a tab labeled “Problems”. This can be very useful for finding out what’s gone wrong. In your case, the explanation to why Ball wasn’t found is likely to be there. And of course, check your Console and Logcat tabs as well.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ 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.