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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:41:16+00:00 2026-06-06T18:41:16+00:00

I am trying to go from the main.java (a splash screen) to Intro.java in

  • 0

I am trying to go from the main.java (a splash screen) to Intro.java in my Android application. But I am getting the following error…

thread exiting with uncaught exception (group=0x40015560)

This is my code…

main.java:

public class main extends Activity {
/** Called when the activity is first created. */

boolean _active = true;
final int _splashTime = 2000; // time to display the splash screen in ms

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



    // thread for displaying the SplashScreen
    Thread splashTread = new Thread()
    {
        @Override
        public void run()
        {
            try {
                int waited = 0;
                while(_active && (waited < _splashTime)) {
                    sleep(100);

                    // waited is incremented by 100 after every sleep for 100 ms
                    if(_active) {
                        waited += 100;
                    }
                }
            } 
            catch(InterruptedException e) {

            }
            finally {

                    finish();

                    Intent inte = new Intent(main.this, Intro.class);
                    startActivity(inte);
                    }
        }
    };

    splashTread.start();


}
// this is to skip splash screen by touch event
@Override
public boolean onTouchEvent(MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_DOWN) {
        _active = false;
    }
    return true;
}

}

Intro.java

public abstract class Intro extends Activity implements OnClickListener
{
/** Called when the activity is first created. */

@Override
public void onCreate(Bundle savedInstanceState) 
{
    Log.d("Error"," Intro Started ");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.intro);


     RelativeLayout layout = (RelativeLayout) findViewById(R.layout.intro);
     layout.setOnTouchListener(new OnTouchListener() {

    @Override
    public boolean onTouch(View arg0, MotionEvent arg1)
    {
         Log.d("Error"," Touch Listener set "); 

        Intent i=new Intent(Intro.this,features.class);  
        startActivity(i);
        return false;
    }


});
}
}

The intro.java was supposed to go to features.java by touch of user…

manifest file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ubuntu.app"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="10" />

<application
    android:icon="@drawable/ubundroid"
    android:label="@string/app_name" >
    <activity
        android:name=".main"
        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=".Intro" />
    <activity   android:name=".Feature"/>
</application>

</manifest>

The Logcat :

 D/dalvikvm(1229): newInstance failed: p0 i0 [0 a1
 D/AndroidRuntime(1229): Shutting down VM
W/dalvikvm(1229): threadid=1: thread exiting with uncaught exception (group=0x40015560)
 E/AndroidRuntime(1229): FATAL EXCEPTION: main
 E/AndroidRuntime(1229): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.ubuntu.app/        com.ubuntu.app.Intro}: java.lang.InstantiationException: com.ubuntu.app.Intro
 E/AndroidRuntime(1229):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
E/AndroidRuntime(1229):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime(1229):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(1229):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
 E/AndroidRuntime(1229):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(1229):     at android.os.Looper.loop(Looper.java:123)
 E/AndroidRuntime(1229):    at android.app.ActivityThread.main(ActivityThread.java:3683)
 E/AndroidRuntime(1229):    at java.lang.reflect.Method.invokeNative(Native Method)
 E/AndroidRuntime(1229):    at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(1229):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime(1229):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime(1229):     at dalvik.system.NativeStart.main(Native Method)
 E/AndroidRuntime(1229): Caused by: java.lang.InstantiationException: com.ubuntu.app.Intro
E/AndroidRuntime(1229):     at java.lang.Class.newInstanceImpl(Native Method)
 E/AndroidRuntime(1229):    at java.lang.Class.newInstance(Class.java:1409)
 E/AndroidRuntime(1229):    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
 E/AndroidRuntime(1229):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
 E/AndroidRuntime(1229):    ... 11 more

Thanks in advance…

=========================== EDITED =====================================

It started running when i deleted all the touch events in the Intro.java.
the new java file was :

package com.ubuntu.app;

import android.app.Activity;



import android.os.Bundle;
import android.util.Log;



public  class Intro extends Activity
{
/** Called when the activity is first created. */

@Override
public void onCreate(Bundle savedInstanceState) 
{
    Log.d("Error"," Intro Started ");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.intro);

}
}

But I would like to get the right way to go to next activity by touch of user..

  • 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-06T18:41:18+00:00Added an answer on June 6, 2026 at 6:41 pm
    • Unable to instantiate activity ComponentInfo{com.ubuntu.app/
      com.ubuntu.app.Intro}: java.lang.InstantiationException:
      com.ubuntu.app.Intro

    ..

    public abstract class Intro extends Activity implements OnClickListener
    

    intro is an abstract class can’t make it instance so when you launch this class android will try to create it’s instance that will give error

    I think I have to write the code

    public  class Intro extends Activity implements OnClickListener
    {
    /** Called when the activity is first created. */
    
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        Log.d("Error"," Intro Started ");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.intro);
    
    }
    
    public void onClick(View v) {
        //handle button event 
    } 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to launch VB application from Java, but I'm getting runtime error: Exception
I am receiving this error when trying to execute applescript from my java application.
Exception in thread main java.lang.NullPointerException at com.hibernate.UserDAO.findAll(UserDAO.java:154) at test.main(test.java:12) I am getting this error
I'm trying to run a sample Java application from the command promopt but I'm
I am trying to run the following C function from Java using JNA, but
Trying to execute WordCount example from cassandra and getting an error: Exception in thread
I'm trying to create an Android test project from within my main project. Exactly
I am trying to return 2 values from a Java method but I get
I'm trying to import a IntelliJ java web application project (Maven Project) from a
I'm trying to run the following rocket launching application: object HelloWorld { def main(args:

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.