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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:44:42+00:00 2026-05-23T19:44:42+00:00

Anyone got any Idea why this code is not working, It was working fine

  • 0

Anyone got any Idea why this code is not working, It was working fine until I tried to install the Google AdMob Ads SDK then all of a sudden the app crashes every time it I try and run it.

package co.miniz.RageToonViewer;

import java.io.FileReader;
import java.net.MalformedURLException;
import java.net.URL;
import org.w3c.dom.Text;
import co.miniz.RageToonViewer.R;
import co.miniz.RageToonViewer.ImageNumbers;
import co.miniz.RageToonViewer.NoRepeatRandom;
import co.miniz.RageToonViewer.Download;
import android.app.Activity;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.TextView;

public class RageToonViewerActivity extends Activity {
FileReader reader;
URL url;
Download DL;
NoRepeatRandom randGen;
ImageNumbers noOfImages;
ImageView imView;
Gallery g;
Text text1;
Bitmap bmImg;
TextView tv;
AssetManager assetManager;
int random;
int prevRand = -10;
int noOfFiles ;


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
        assetManager = getAssets();
        DL = new Download();
        imView = (ImageView)findViewById(R.id.mainImage);
        imView.setScaleType(ImageView.ScaleType.FIT_CENTER);

        //----- Get Number OF Images -----
        noOfImages = new ImageNumbers();
        noOfFiles = noOfImages.GetNumber();

        //----- Set Button and Text outPut for testing -----
        Button button1main = (Button) findViewById(R.id.button1);
        tv = (TextView)findViewById(R.id.text1);
        tv.setText("Click above for a random RageToon!");


        //----- Generate Random Number -----
        randGen = new NoRepeatRandom(0, noOfFiles);
        random = randGen.GetRandom();

        //----- Set First Image -----
        imView.setImageBitmap(GetImage());

        //----- Set up Button Click Action -----
        button1main.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                tv.setText("Click above for a random RageToon!" + noOfFiles);
                noOfFiles = noOfImages.GetNumber();
                imView.setImageBitmap(GetImage());
            }
         });

        imView.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                tv.setText("Click above for a random RageToon!" + noOfFiles);
                noOfFiles = noOfImages.GetNumber();
                imView.setImageBitmap(GetImage());
            }
        });
} 

public Bitmap GetImage() {

    random = randGen.GetRandom();
    URL tempURL = null;
    try {
        tempURL = new URL("http://miniz.co/RageToonApp/Images/" + random + ".jpg");
    } catch (MalformedURLException e1) {
        e1.printStackTrace();
    }
    Bitmap TempImage = DL.getRemoteImage(tempURL, tv);

    if (TempImage == null)
    {
        TempImage = GetImage();
    }
   return TempImage;
}
}

When Debugging I can see an java.lang.RuntimeException: Unable to instantiate activity ComponentInfo in the LogCat view.

Thanks for any Help !
Ross.

edit : From LogCat

07-17 01:35:14.680: WARN/dalvikvm(3540): threadid=3: thread exiting with uncaught exception (group=0x40023160)
07-17 01:35:14.680: ERROR/AndroidRuntime(3540): Uncaught handler: thread main exiting due to uncaught exception
07-17 01:35:14.770: ERROR/AndroidRuntime(3540): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{co.miniz.RageToonViewer/co.miniz.RageToon.RageToonViewerActivity}: java.lang.ClassNotFoundException: co.miniz.RageToon.RageToonViewerActivity in loader dalvik.system.PathClassLoader@458a4278
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2424)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2519)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.app.ActivityThread.access$2200(ActivityThread.java:123)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1870)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.os.Looper.loop(Looper.java:123)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.app.ActivityThread.main(ActivityThread.java:4370)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at java.lang.reflect.Method.invokeNative(Native Method)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at java.lang.reflect.Method.invoke(Method.java:521)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at dalvik.system.NativeStart.main(Native Method)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540): Caused by: java.lang.ClassNotFoundException: co.miniz.RageToon.RageToonViewerActivity in loader dalvik.system.PathClassLoader@458a4278
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
07-17 01:35:14.770: ERROR/AndroidRuntime(3540):     ... 11 more
07-17 01:35:14.890: ERROR/SemcCheckin(3540): Get crash dump level : java.io.FileNotFoundException: /data/semc-checkin/crashdump
07-17 01:35:14.900: WARN/ActivityManager(1146): Unable to start service Intent { act=com.sonyericsson.android.jcrashcatcher.action.BUGREPORT_AUTO cmp=com.sonyericsson.android.jcrashcatcher/.JCrashCatcherService (has extras) }: not found
07-17 01:35:15.000: INFO/Process(1146): Sending signal. PID: 3540 SIG: 3
07-17 01:35:15.000: INFO/dalvikvm(3540): threadid=7: reacting to signal 3
07-17 01:35:15.000: ERROR/dalvikvm(3540): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
07-17 01:35:15.060: ERROR/SemcCheckin(1681): Get Crash Level : java.io.FileNotFoundException: /data/semc-checkin/crashdump
07-17 01:35:15.170: DEBUG/dalvikvm(2189): GC freed 264 objects / 16000 bytes in 32ms
07-17 01:35:19.036: WARN/jdwp(3540): Debugger is telling the VM to exit with code=1

Edit: Thanks for the reply but the code is still not working after fixing the path names and such.
I have found out that every app I now create in eclipse that uses any for of connection to the internet will now crash when I try and run it on my phone ?
They also crash when I use the code:

requestWindowFeature(Window.FEATURE_NO_TITLE);

I hope this will help in determining what has gone wrong.

  • 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-23T19:44:43+00:00Added an answer on May 23, 2026 at 7:44 pm

    From exception it is clear that dalvik is looking your file “RageToonViewerActivity” under path “co.miniz.RageToon.RageToonViewerActivity” but is defined in package “package co.miniz.RageToonViewer” hence not able to locate.

    1. I would advice you to go to android manifest file and where you activity is defined,give full path.

      <activity android:name="co.miniz.RageToonViewer.RageToonViewerActivity" // change this line
          android:screenOrientation="portrait">
          <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
          </intent-filter>
      </activity>
      

    2.Clean your Project. and have a go!!

    Gud luck!!

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

Sidebar

Related Questions

Anyone got any Idea why this code is not working, It was working fine
Has anyone got any idea how this google code works? i got the following:
Anyone got an idea how to get from an Xserver the list of all
Has anyone got to some good code to zoom into an image using javascript?
Has anyone else run into this problem before? I've got a method that calls
Has anyone got the Graphical Layout working correctly in either Eclipse 3.5 or 3.6
Anyone got a ready made function that will take an XML string and return
Has anyone got much experience deploying applications to Amazons EC2? I am considering doing
Looking for good project methodologies.Anyone got some good reference links..want to share.
Has anyone out there got a good set of instructions for building/compiling Ruby from

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.